On 2/2/12 3:00 PM, Antonio Rodriges wrote:
Hello,
It would be nice if someone has ideas for the next items:
Suppose session is the reference to the same session throughout
1) when a message is not yet transferred since last session.write
call, if a thread calls session.write does the message goes to queue
and no part of it is transferred until the previous message is done?
Depends. If you have added an unordered ExecutorFilter into your chain,
then it can happens. The default behavior is that once each session is
attached to one single IoProcessor, it will be fully enqueued before
another write for this very session can be enqueued.
2) if two distinct threads call the session.write (on the same session
reference), with different messages they will appear in the same
message queue, but due to queue locking only one of them will start
being transferred via network?
There is one queue per session, so they will push the messages into one
single queue. As the enqueued messages are transfered to the Channel one
by one, until the current message has been completely written, you can't
send a part of a message, then a part of another, then another part of
the first message...
--
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com