Structured message reading problem in Netty.
Frederic Bregier
fredbregier at free.fr
Fri May 1 08:15:36 EDT 2009
Hi,
Maybe Trustin could have an idea on how to read all data send to the wired (and received) even if the connection is down.
I think it is doable using OrderedMemoryAwareThreadPoolExecutor inserted in your pipeline (same executor for all channel) just after you codec since it should ordered all events, even the disconnection so that the final handler should get all events in order (all packets first then the disconnection). But maybe I'm wrong...
HTH,
Frederic
----- Original Message -----
From: manishr22 (via Nabble)
To: Frederic Bregier
Sent: Friday, May 01, 2009 12:54 PM
Subject: Re: Structured message reading problem in Netty.
Hi Frederic,
Thanks for your clarification. But the problem is, we are trying to make a asynchronous TCP/Ip communication then there should be any dependency on client.
In my existing code what you said is exactly right.
- I have my normal client (non-netty) it creates TCP connection and send as much data it wants and terminates.
- I believe as much data client has written on the socket should be read by server.
- In my case i have several such client and they can send as many number of message to the server they want. how come i understand when to send back "end of transmission" to the client, then only client should disconnect.
- The workaround is my client should send "bye/final" after all its messages then in the echo from server send back the same and then only i should close connection from client. But this way i am synchronizing my server with client.
- If i have my server with normal socket, even though my client connection goes down, server will still be reading all buffered socket data without any problem.
- In what sense netty is differentiating here.
Regards,
Manish
-----
Hardware/Software Architect
--
View this message in context: http://n2.nabble.com/Structured-message-reading-problem-in-Netty.-tp2682454p2752831.html
Sent from the Netty User Group mailing list archive at Nabble.com.
More information about the netty-users
mailing list