I'm a bit unclear on the javadoc description of this
method. The following is the actual description.
WriteFuture write(Object message)
Writes the specified message to remote peer. This
operation is asynchronous;
IoHandler.messageSent(IoSession, Object) will be
invoked when the message is actually sent to remote
peer. You can also ait for the returned WriteFuture if
you want to wait for the session actually closed.
The last part is where it is a bit unclear to me. Is
it saying that when you join on the future the session
is to be closed after that? Or does it mean that the
actual write operation has fully completed and the
session remains open?
In addition, is there a synchronized version of this
method? I'm just curious what is the best way to
handle a case where you may have multiple threads that
want to send packets of data to the same session.
Basically you have multiple client sessions driving
messages down the same piple to the server, the data
can not be mixed. Should I do my own locking in this
case?
Thanks, S.D.