G'day, I'm working on a proxy, but one of the socket's inputstream is being weird:
while(true) {
try {
while ((BytesRead = inputstream.read(Line)) != -1) {
OtherSocket.Write(Line, BytesRead);
}
} catch (IOException e) {
e.printStackTrace();
}
}
I have pretty much the same thing for the OtherSocket, but on this one, it keeps repeating as if the server keeps sending data, I'm guessing that inputstream.read(Line) isn't waiting for input but returns -1. Is there any reason why inputstream.read(Line) wouldn't wait for input as it's meant to?
OtherSocketa custom class?