Custom Protocol

Dec 24, 2012 at 1:40 AM

Hello, i tried everything to get my Protocol working but i can't get it after spending hours on it.

This is how the packets look like:

[Size(Int16)][Key(Byte)][Body(Byte())]

hopefully you can help me. :)

Thanks, Bliz.

 

 

 

 

Coordinator
Dec 24, 2012 at 1:45 AM

Hello, which version of SuperSocket are you using?

I strongly recommend you to use 1.5, because it provides more conveniences to implement custom protocol.

Please take a look at the part

Fixed Header with Body Length Protocol

 of the documentation:

http://supersocket.codeplex.com/wikipage?title=The%20Built-in%20Common%20Format%20Protocol%20Implementation%20Tools

In your case, the header size is 3, the first two bytes of the header is body's length.

Dec 24, 2012 at 4:05 AM
Edited Dec 24, 2012 at 4:06 AM

Thanks, got it working now!

Was a bit confusing at the start, but now i can go to sleep. :)

Great library! Thanks for the good work.

Happy holidays!

Bliz