Question on asynchronous AsynchronousSocketChannel#write
Leon Finker
leonfin at optonline.net
Fri Apr 24 10:18:29 PDT 2009
Hi,
Are there any samples on properly using:
AsynchronousSocketChannel#write(ByteBuffer src, A attachment,
CompletionHandler<Integer,? super A> handler) ?
I'm looking for a best practice example for completed() callback for async
write. Can Integer result that is passed to us (in completed callback) be
less than the ByteBuffer size that we specified in the write method call? I
actually see a case that the result I get in completed callback() for write
is bigger than the original ByteBuffer capacity under stress. I'm probably
doing something wrong, so I wanted to see a best practice example. I'm on
b56. Thank you
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/nio-discuss/attachments/20090424/6d09f774/attachment.html
More information about the nio-discuss
mailing list