Typecasting Problem Using Netty and Google Protobuf
Akash Gangil
akashg1611 at gmail.com
Mon Jul 25 07:38:34 EDT 2011
>
>
> *EchoServerhandler.java :*
>
> @Override
> public void messageReceived(
> ChannelHandlerContext ctx, MessageEvent e) {
> System.out.print("Message Received : " + e.getMessage());
> Packet req = (Packet) e.getMessage();
> System.out.print("Packet Id received : " + req.getPacketId());
> System.out.print("Packet Type received : " + req.getPacketType());
> System.out.print("Packet Content received : " +
> req.getPacketContent());
> }
>
>
>
Also a system.out.print(e.getMessage()) here gives
Message Received : BigEndianHeapChannelBuffer(ridx=0, widx=17, cap=17)
so I guess somehow the decoder is not working.
Though, I have implemented the same message receive logic on the client side
too,
and there I am able to receive messages from the server through this
framework.
> --
>
Akash
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/netty-users/attachments/20110725/1b4c65bf/attachment.html
More information about the netty-users
mailing list