Can a server written using Netty handle requests from non-netty based clients
ovokinder
kindernade at gmail.com
Tue Jul 20 12:25:56 EDT 2010
Looking at Marc's reply now I noticed my previous email didn't hit the list,
so I'm posting this from nabble.
Won't add much now, but still... :)
---------------------------------------
Noopur,
It means that the same communication protocol must be used by both. When a
client sends a message, the server needs to know how to decode it and
vice-versa
Simple example: a custom TLV protocol, Type-Length-Value, 1 byte for type, 4
bytes for length and variable length for value.
When the client sends a message of type 1, with length 6 and value "oh hi!",
it encodes this message as binary (1 + 4 + 6 bytes, total of 11 bytes) and
writes it on the socket; the server, which is expecting to read TLV, knows
it must read a byte to determine message type, another four bytes to
determine the size and then 6 more bytes to complete the message.
In other words, the server and client need to know how to read each other's
messages, as well as write.
Cheers,
Bruno
--
View this message in context: http://netty-forums-and-mailing-lists.685743.n2.nabble.com/Can-a-server-written-using-Netty-handle-requests-from-non-netty-based-clients-tp5308472p5317353.html
Sent from the Netty User Group mailing list archive at Nabble.com.
More information about the netty-users
mailing list