Need Help Doubt About Handle Packets C#

Joined
Jul 8, 2009
Messages
588
Reaction score
151
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:
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)

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 https://github.com/cyberinferno/ZoneAgent562/blob/74d413915e9b5c26201e7aba3f9c7e62a8d2fb7e/ZoneAgent562/Packet.cs#L244
 
Back