I try to catch message from my client over socket. the message contains
text and character hexadecimal, ex: chr(1C), chr(1D). Everytime my
client send the message, i never accepted, but when my client close the
socket, all the message appear in my server program. It seems like the
message been hold in stack memory or something, i don't know.
the code in server side is:
BufferedReader inFromClient;
DataOutputStream outToClient;
String dataFromClient;
try {
inFromClient=new BufferedReader(new
InputStreamReader(serverSocket.getInputStream()));
boolean isQuit=false;
while (!isQuit) {
dataFromClient=inFromClient.readLine();
System.out.println(dataFromClient);
}
inFromClient.close();
serverSocket.close();
}
catch(IOException ioe) {
System.out.println("error: " + ioe);
}
where do i wrong?, please help me.