AsynchronousSocketChannel write() semantics
Avinash Lakshman
avinash.lakshman at gmail.com
Wed Jan 20 20:01:33 PST 2010
Hi All
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?
Cheers
Avinash
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/nio-discuss/attachments/20100120/83a973e9/attachment.html
More information about the nio-discuss
mailing list