how do ppl handle this, Im finding as I move deeper into my project that my readbuffer is backing up, my packets were geting smashed together so I started sending a delimer at the end of each packet and spliting the string to seperate each packet, is there a good way to hold these split packets until I can process them
thanks a ton
btw im using C#

handling packets on recive
?everser
Brad Smith
thanks
romdawg
In this way, i think it'll faster and more feasible.
SteveWE
If you are workign with a TCP connection, there is no gaurantee that what you send in one call to a sockets send method is what is received in one recieve call on the server. For example, the client could send 60 bytes in one call to Send ( ...) and the server app could require 3 calls to receive to get all 60 bytes.
You have it right, the way to handle this is via a delimeter or some kind. Some methods to do this are:
- special character in the data stream
- byte count per "packet"
- make each "packet" the same size so there is no need for delimeters.