beforeClose() is meaningless because we cannot guarentee that it is invoked "before" a connection is closed, becuase a remote peer can close the connection.
On 5/11/06, Michael Bauroth <[EMAIL PROTECTED]> wrote:
WDYT about something like additional callbacks in IoHandlerAdapter and derived SessionHandlers called before... ? With such stuff it would be possible to implement the underneath code in the beforeClose() method. Does this make sense? Regards Michael Trustin Lee wrote: > IoSession.close() closes the connection even if there's more data to write. > If you want to flush all data before closing the connection: > > session.write(message).join(); // Make sure to call join() before calling > close() > session.close(); > > HTH, > Trustin
-- what we call human nature is actually human habit -- http://gleamynode.net/ -- PGP key fingerprints: * E167 E6AF E73A CBCE EE41 4A29 544D DE48 FE95 4E7E * B693 628E 6047 4F8F CFA4 455E 1C62 A7DC 0255 ECA6
