Is there a good tutorial or example showing a combination of protobuf-net and zeromq?

Is there a good tutorial or example that shows how to use protobuf-net and zeromq together? Maybe an example client / server application showing this usage?

+4
source share
1 answer

This is a very specific pairing. Instead, I will focus on two questions:

  • How to pass byte[] through zeromq?
  • How to use protobuf with byte[] ?

The answer to the second: through MemoryStream ; either create a new MemoryStream(bytes) or (serialization), create an empty MemoryStream , write to it, then call ToArray() .

I don't know much about zeromq, but most buses make it easy. If it only processes strings, then use Convert.ToBase64String () and Convert.FromBase64String ().

+2
source

All Articles