Hi I am no network expert but I thought the purpose of tcp/ip was to insure that packets arrive (in the correct order and with the right checksum) at their destination. If a peer writes to the connection and does not receive an ACK eventually, it would cause some low level exception that could propagate up the chain into mina and subsequently into my program telling me that it was in fact not sent. Is there really no such mechanism or have I misunderstood the basic concept?
Keep alive, hearbeats pings and pongs will just insure that it will detect disconnections faster but will not tell me whether my important message was sent or not. Implementing my own handshake when there is an inbuilt one in tcp/ip seems excessive. > Date: Fri, 8 Mar 2013 14:24:09 +0100 > From: [email protected] > To: [email protected] > Subject: Re: writeFuture.isWritten is true despite failing > > Am 08.03.2013 14:18, schrieb Emmanuel Lécharny: > > The writeFuture just inform you that the message has been pushed in the > > socket. That does not mean it has been received by the peer. > > > > The thing is that when you pull the peer cable, the server won't be > > informed about it, so the server "thinks" that the connection is still > > opened. There is absolutely nothing we can do about that, it's the way > > TCP works. > > > > > @Geronimoo CB > > tip: if possible, add a keep-alive-message on protocol level to overcome > this. > > I use the session-idle state to detect a non-active connection and send > a "ping" message, which has to be replied by the remote side with a > "pong" message within X seconds, otherwise the connection is considered > as broken. > > br, > Alex >
