Is there any nice way to wait for the hole string in DataArrival?
I mean, if I send a string which will raise the DataArrival event twice. Is there any way to see if it's the end of the string?
Printable View
Is there any nice way to wait for the hole string in DataArrival?
I mean, if I send a string which will raise the DataArrival event twice. Is there any way to see if it's the end of the string?
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.
I have made a similar thing to determine the end of the transfer. But how nice is it. Not that much.