Need Help Doubt About Handle Packets C#

Joined
Jul 8, 2009
Messages
445
Reaction score
64
Hello there is someone willing to help me with any questions about handling packet in C#

i got some problem when exemple:

1: sometimes game client send a list of packet in the same buffer and need split it before processing ( but it's not the biggest problem sometimes in the list of packets any packet dont comes complete exemple let's say all packets have same size of 1000bytes and then recive a list of packets size 2500bytes so Let's suppose the third packets comes incomplete i have difficult to fill this incomplete packet and im not sure if the way im doing the split buffer are really corect)
 
Last edited:
Joined
Jun 10, 2009
Messages
659
Reaction score
141

Some of the old MMOs do send mutiple packets in a single go. Usually packet body has header which contains length of each individual packet.

While we were developing emulator for A3 Online MMO we wrote a method called SplitPacket which splits the received packet into multiple piece based on the length specified. You can check the code here