mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Akbar Munir Chaudhary <ak...@acm.org>
Subject Re: TCP packet delivery failure
Date Mon, 20 Nov 2006 10:40:48 GMT
Hi Trustin,

>> In the case of packet being successfully delivered, MINA does fire
>> IoHandler.messageWritten(). But if from some reason, the packet can not be
>> delivered, is there a notification that my application can listen to to
>> process failure workflow?


>Unfortunately, no.  It's an O/S that guarantees the delivery.
>messageWritten event is fired when the data is written out to the kernel
>write buffer.  To make sure the message is delivered, you will have to wait
>for an acknowledge message from the remote peer by redesigning/refactoring
>your protocol.

But in that case, wouldn't I be better off designing my send + ACK protocol over UDP instead
of going through the overhead of session opening and closing? I always thought that the TCP
stack in the kernel would actually let the higher layer know if it has received the ACK for
the packet that was requested to be sent. In fact the kernel's TCP stack must receive the
ACK before it can declare a message to be delivered successfully. Why doesn't it then pass
this information to the higher layer?

My apologies for asking a partially unrelated question, but from what you have written, there
is a lot of work that I will need to redo in my implementation.

Thanks,
Akbar.




Mime
View raw message