How To Read Data From Socket Connection - Android
I've got TCP client app which successfully negotiates connection to server and receives buffered output, but what I need to know is how to read server responses without waiting to
Solution 1:
The underlying protocol should provide some kind of synchronisation, like HTTP's Content-Length
or \n\r
.
Otherwise, you'll get blocked even if your program reads byte by byte.
Or you could use a non-blocking socket.
Post a Comment for "How To Read Data From Socket Connection - Android"