Just talked to MS about this, it's a known issue with the Winsock control.
The KB article is:
http://support.microsoft.com/support/kb/articles/q245/1/59.asp
Their only suggestion for a workaround so far was to call DoEvents after
SendData, so far this has not worked for us. If someone else has any other
suggestions or workarounds, I'd be greatful to hear them.
Quote:
> Hello,
> I encounter the same kind of problem, but when looking at the log
generated
> by my application, I'm almost sure that the problem is in the winsock
> control : I'm writting a kind of proxy with VB, I get the data with INet
> (works fine) but sometimes, data sent by Winsock nevers reach the client
(a
> web browser)
> I'm waiting for help or advices !
> > Hi,
> > I've an application server that listen to one port and can manage
mutiple
> > client connections on that port (i use an array of sockets, the index 0
is
> > the listening socket that load new controls when clients request a
> > connection)
> > Client & server exchange messages using the SendData method and the
> > DataArrival event, for debug operations i trace in a text file the
> SendData
> > method and DataArrival, SendComplete, Error events.
> > When there's only one client everythings work fine, but when i try with
> two
> > clients at the same time i've a problem:
> > the two controls are loaded correctly and they begin to send/receive the
> > messages, but only one client do all the operations succesfully, the
> other
> > is blocked waiting for a server message that never arrives.
> > Browsing the server log i see the various call of SendData method with
> their
> > relative SendComplete events, but at certain point there's one SendData
> Call
> > without SendComplete method. Why ?
> > I take a look of Error Events (maybe NoBufferSpace error) but no errors
> were
> > recorded in the log...
> > I tried also to check the network using the Network monitot agent, but
the
> > message hasn't passed on the network.
> > I'm almost sure that the server hasn't transmitted the message, but why
> ???