Reading bytes from TCP port
807607Dec 9 2006 — edited Dec 13 2006Actually looking to read: client data(these are devices sending data to server socket, each device sends data on state of change) send to the server socket on TCP port 11111. This program is to run all times and say should pass the received string to a thread for processing. But while reading
is = socket.getInputStream() ;
while(true) {
System.out.println( "" + Integer.toHexString(is.read()));
This reads byte by byte. I am looking for a way to read data send by each device (may be 20-30 characters) at a go.