Have you ever suffer that socket channel will not send all bytes out in NIO

I found that the when call the SocketChannel.write(ByteBuffer buf)even the buf.remaining() is zero, sometime the contents will not arrive the destination.Have you ever suffered it?
[201 byte] By [googlelinya] at [2007-10-1 21:20:46]
# 1
The last bytes never get there? If you are talking about machine-to-machine communiocations, there are several steps involved. Have you tried to use any tools, like Ethereal, to see if it went across the wire?
amorrow@earthlink.neta at 2007-7-13 3:16:47 > top of Java-index,Administration Tools,Sun Connection...
# 2

When the server is not busy, all bytes will get to the destination machine.

But if the server is busy, 1% or less will disappear.

It's so strange.

For an example:

while(buffer.remaining()>0)

socketChannel.write(buffer);

The real code is not like this. The real code will depend on the selector to call the write function.

googlelinya at 2007-7-13 3:16:47 > top of Java-index,Administration Tools,Sun Connection...