|
-
Feb 11th, 2009, 09:54 AM
#1
Thread Starter
New Member
Understanding packet arrival
Hows it goin yall, i've got an issue with retrieving info via tcp/ip using the winsock control. Basically i'm trying to understand if I need to check packet length for an incomplete packet.
I have a server accepting multiple clients. Under the dataArrival sub on the server, I'm trying to understand how to interpret the incoming data.
So far I know to add delimiters to each message to break up the data...I know how to process this. But what happens when the string that is read in (with getData) has an incomplete message on the end? Could that happen and how do I handle that?
Let me give you an example in case this didn't make sense:
Delimiter is ':'
In dataArrival, sock1.GetData retrieves a string "msg1:msg2:msg3:ms" with 'msg4:' cut off. Could that happen? and if so, how would I go about handling getting the rest of the message and forming a whole message.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|