Can a server written using Netty handle requests from non-netty based clients

Noopur Tiwari noopur_tiwari at persistent.co.in
Thu Jul 22 03:53:11 EDT 2010


Thanks a lot. I will try implementing it and get back to you guys.

-----Original Message-----
From: netty-users-bounces at lists.jboss.org [mailto:netty-users-bounces at lists.jboss.org] On Behalf Of ovokinder
Sent: Tuesday, July 20, 2010 9:56 PM
To: netty-users at lists.jboss.org
Subject: RE: Can a server written using Netty handle requests from non-netty based clients


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.
_______________________________________________
netty-users mailing list
netty-users at lists.jboss.org
https://lists.jboss.org/mailman/listinfo/netty-users

DISCLAIMER
==========
This e-mail may contain privileged and confidential information which is the property of Persistent Systems Ltd. It is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are not authorized to read, retain, copy, print, distribute or use this message. If you have received this communication in error, please notify the sender and delete all copies of this message. Persistent Systems Ltd. does not accept any liability for virus infected mails.



More information about the netty-users mailing list