Google protocol Buffer Codec

ritom ritom at hotmail.com
Fri Jan 1 22:53:29 EST 2010


Can somebody please help me understand the google protobuf support within
Netty. 
In the LocalTimeServerPipelineFactory example we have 

p.addLast("protobufDecoder", new
ProtobufDecoder(LocalTimeProtocol.Locations.getDefaultInstance()));

That would mean we can now receive the Locations message in
TimeServerHandler.

 public void messageReceived(ChannelHandlerContext ctx, MessageEvent e) {
        Locations locations = (Locations) e.getMessage();

How would I implement support for multiple incoming message types where you
might be receiving different types of request from the client. Lets say you
are receiving Logon first then BalanceRequest, TransferRequest and so on.
Also server will reply with multiple Message Types depending on the request.
Can somebody please please help.

Tom
-- 
View this message in context: http://n2.nabble.com/Google-protocol-Buffer-Codec-tp4241485p4241485.html
Sent from the Netty User Group mailing list archive at Nabble.com.


More information about the netty-users mailing list