AsynchronousSocketChannel write() semantics
avinash.lakshman at gmail.com
Wed Jan 20 20:01:33 PST 2010
I am trying to understand the semantics of the write() in the
AsynchronousSocketChannel (ASC). Here are my questions:
(1) Is will the completion handler invoked only when the write completes
i.e all the bytes in the byte buffer are written out?
(2) Suppose two threads write to the same ASC instance will the second write
fail if the first has not completed? What if all the bytes of the first
write have not been written out? How do I handle the subsequent write? Are
the semantics same as in non-blocking I/O?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the nio-discuss