While reading through socket's inputStream, you use most of the time "(ch=in.read)!=-1"
This thing sometimes doesn't work.
So, alternative solution to it is:
Append the end of line character at the end of line from the sender's side.
Then, use it as terminating condition for loop.
End of line can be identified by: '\u0085', '\n', '\r', "\r\n".
In my case, it was not working for any other than '\u0085'.
This thing sometimes doesn't work.
So, alternative solution to it is:
Append the end of line character at the end of line from the sender's side.
Then, use it as terminating condition for loop.
End of line can be identified by: '\u0085', '\n', '\r', "\r\n".
In my case, it was not working for any other than '\u0085'.
Comments
Post a Comment