PDA

Click to See Complete Forum and Search --> : Winsock buffering before send


Apr 20th, 2000, 05:25 AM
I have been writing a chat client/server to familiarize myself with the Winsock control. I'm using TCP, not UDP, for the connection protocol. The server has a Winsock control array that it grows as clients attach, and a collection class to store information on users. All this seems to work fine, but I'm having one inexplicable problem. It may be my code, or it may be a functionality issue with the control.

My question is, does the Winsock control buffer data before sending it in one lump sum? It looks like that's what's happening. If so, is there a way around this?

Apr 21st, 2000, 04:30 AM
I found that I can use the API in conjunction with the OCX control just for the send() function to produce the desired result.

privoli
Apr 21st, 2000, 12:11 PM
Yes... it's a bug in the winsock control that you are experiencing... Try the following code..

'doesn't work as buffer bug takes effect
For X = 1 to 10
Winsock(x).SendData MessageStr
Next X

'works perfectly as buffer is dumped each loop
For X = 1 to 10
Winsock(x).SendData MessageStr
DoEvents
Next X