c*******t 发帖数: 32 | 1 I need transfer data between two sockets. After create two sockets,
I use the below code to transfer data. When I type the first line,
I got the response line from another socket. But when I type one more
line, the another socket cannot get this line. Could somebody help me?
while ( (numBytesClient = fromClient.read(bufferClient)) != -1) {
toAnotherClient.write(bufferClient,0,numBytesClient);
toAnotherClient.flush();
}
while ((numBytesAnotherClient = fromAnotherClient.read(bufferAnother)) |
|