Hi

I'm having some trouble sending data with winsock.

My client application will send data to my server application.

I user TCPconnect.SendData ("abc...") etc.

I use a sub proecdure to find out what the client has send. All messages are prefixed with a 5 character code.

Then the server will do something according to what it recieved.

The problem I get is that sometimes the client needs to send 2 bits of data.

i.e.

TCPconnect.SendData ("blah blah")
TCPconnect.SendData ("blah2 blah2")

But the server will recieve "blah blahblah2 blah2"

Is there anyway to make sure that the data has been sent before it sends the next string?

I've tried putting DoEvents inbetween the two SendData commands, but that doesn't work.