Good question... I usually just attach something to the start and the end of what I am sending so I know when I the message is done.

wskClient.SendData "||MessageStart||" & Data & "||MessageDone||"

Then on the server I check for the string "||MessageDone||" and if it's there, then I execute whatever.

wskServer.GetData NewData

theData = theData & NewData 'theData is a global variable

If right$(theData,15) = "||MessageDone||" then

'I know I have the entire message so I can do whatever

end if


That darn winsock control needs to be rewritten to be a little bit more user friendly... I have put hours into figuring out how it works and I still don't understand it fully.