Skip to content
meros edited this page Oct 31, 2010 · 2 revisions

What is pb4mina?

  • A protocol filter for MINA 2.0.x that decodes/encodes protocol buffer messages What isn’t pb4mina?

  • an RPC solution

Usage notes: Messages are delimited using a 4 byte little endian size delimiter:

<4 byte size><serialization of protocol buffer message>

You need to know beforehand what message will arrive on the wire (since protocol buffers do not contain that kind of type information). One way of achieving this is to use one message type for all messages between two endpoints:

message Req { optional LogInReq logInReq = 1; optional DoSomethingReq doSomeThingReq = 2; }

at the other end you can then check wheter or not logInReq etc are set in the sent message.

Clone this wiki locally