thank you.
Type: Posts; User: perl0101
thank you.
socket is an instance of SocketChannel.
If I add an interval between messages, the problem is not there. I just feel that adding an interval may not be a good solution. Is there other ways?
Thank you. But the SocketChannel class just provide method to read a chunk, instead of byte by byte. Is there any way to read the header and get message size first. Then I can read the required...
For read:
n = socket.read(rbuf);
if (((n==0) || (n==-1))) {
logger.logInfo("t=" + t + " count=" + count + " and break."); //5-21-11
break;
}
For...
I am confused with my project.
It is a server/client system which uses java nio.
The requiremet is that the server keep sending 10 messages to the client. Then the client read messages. But the...