Does Android TCP Socket Client read one more line the response??
inputStreamReader = new InputStreamReader(socket.getInputStream());
bufferedReader = new BufferedReader(inputStreamReader);
response = bufferedReader.readLine();
response = bufferedReader.readLine();
Log.i(TAG, "Response :: " + response);
I cannot read two line. Because my server will response
200 OK \n
Content…….
And the content will stream to the client every seconds, I don’t wanna connect the socket every times. Can sbd help??
An example that will continue to read until an empty new line is found: