Structured message reading problem in Netty.
manishr22
manishr22 at gmail.com
Thu Apr 23 07:45:49 EDT 2009
Hi,
I am new to netty and tried writing netty-server as per my requirement
seeing various examples. But i am not getting the result correctly.
I am trying to write a netty server that can read the that will read the
message-structre from normal synchronous multi-threaded client ( say 10
client is sending 1000 messages each ) to the server.
By message structure i mean my client is sending the message in the format :
[MESSAGE 1-CLIENT 1] message-length(first 4 byte) header length(next 4
byte) data (including
header and body as specified bytes of message length and header length)
[MESSAGE 2-CLIENT 1] message-length(first 4 byte) header length(next 4
byte) data (including
header and body as specified bytes of message length and header length)
........
........
[MESSAGE 1-CLIENT 2] message-length(first 4 byte) header length(next 4
byte) data (including
header and body as specified bytes of message length and header length)
[MESSAGE 2-CLIENT 2] message-length(first 4 byte) header length(next 4
byte) data (including
header and body as specified bytes of message length and header length)
....
.....
[For N number of client and N http://n2.nabble.com/file/n2682454/netty.zip
netty.zip number of messages]
and now my netty server should read all the different messages from client/s
and do the proper message parsing and do some business operation.
How i can implement the reading of message-structure using netty.
I saw several example and implemented something in it. but its not giving
the appropriate result rather i am getting exception all the time.
The basic source code which i tried for this is also attached for reference.
Any suggestion and help with some sample code will be really appreciated.
Regards
Manish
--
View this message in context: http://n2.nabble.com/Structured-message-reading-problem-in-Netty.-tp2682454p2682454.html
Sent from the Netty User Group mailing list archive at Nabble.com.
More information about the netty-users
mailing list