protocol buffer

Jan 21, 2012 at 10:25 PM

I have been looking at supersocket and it seems quite good. Is there any plan to build in support for Protocol Buffer maybe by using an existing implantation like protobuf-net ( It seems to allow you to do a similar thing you are currently doing with the text protocol but with binary and to also easily go cross language to clients written in java, c++ and python among others.

I have been playing around trying to integrate it my self as the protobuf-net implementation is quite easy to use but i cam currently finding building a custom protocol into supersocket that returns objects and accepts objects to be quite complicated as well as working out how to get commands to register etc.  If there was someone that knew how supersocket actually works internally i am sure this would not be hard to add and could add a lot of value to the lib as the protocol buffer is an extremal fast and efficient (processor usage, memory and data length after serialisation all smaller) serialize of objects compared to xml, json or dotnet binary serialize.

I know it will prob never get added but maybe this post will pick up someone interest that actually knows supersocket well and it may happen.

Jan 22, 2012 at 8:53 PM

Well finally making some head way. My issue was i was starting with the custom protocol when really if i want to deal with objects it needs to be at the CommandInfo level and work down from there.


When it is done i am happy to post the source for anyone interest in making a server that uses Protocol Buffer for transmissions instead of strings or pure bin ary

Jan 23, 2012 at 11:12 AM


If I have time, I'll implement one.

Jan 23, 2012 at 6:57 PM


I think i almost have a working implementation but there i think there is a bug in protobuf-net that its developer is checking for me or i am doing something wrong.  Once i resolve that and if it works i will post the code.

One thing I did find a little restrictive in SuperSocket is that while you can specify the types for everything as long as they extend an interface that is not the case for the IAppServer and IAppSession passed into the methods on the CommandReaderBase or the interface it implements. I really wanted to be able to force them to be a particular type in my implementation of the ICommandReader as i would have prefered to access some custom properties on them.  Since i could not force the type required in the end i used an external static class which works fine but is slightly less ideal.  I jsut would have prefered the compile time checking i could have put on everything to make sure all the correct classes are using.



Mar 26, 2012 at 9:43 PM

Hi any luck with this? Could you please post what you have to save me some time from developing it from scratch? Thanks so much

Apr 2, 2012 at 8:44 PM

Hi gamesbox,

Sorry for the slow reply but i needed to check my code and make sure i use SuperSocket still as i tried many different options originally and i am going down a different path now because a normal tcp connection can't meet my needs.  All that said i did get the protobuf working perfectly for myself and my issues were outside the implementation so i am happy to post the code. I think i made an example at the time that i can maybe upload or i will need to strip it out of an old verson of my system so let em know if still interested.





May 23, 2012 at 1:28 PM

I'd be interested in seeing your implementation as well - would you still be able/willing to provide some samples/snippets?

Dec 4, 2012 at 2:15 AM


I'd be interested in seeing your implementation as well - would you still be able/willing to provide source code?

Dec 6, 2012 at 6:48 PM

ok i grabbed what i think is the relevent code from my old project and put it in a zip.

If stuff that you need is missing let me know but understand it was part of a larger whole so it will not work on its own. That siad the parts you need should be there and it is more just customising it into a test project instead of it expecting to talk to more layers.

Dec 7, 2012 at 1:56 AM

Tks.You helped me a great favor

Dec 7, 2012 at 1:58 AM

No problem it should be quite flexible once you understand how it works.

On 07/12/2012 1:56 PM, "liminany" <> wrote:

From: liminany

Tks.You helped me a great favor

Read the full discussion online.

To add a post to this discussion, reply to this email (

To start a new discussion for this project, email

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at