R
RFleming
Hello,
Somewhat new to JAVA, and I swear I have looked all over on this
problem, and found an answer, but it does not seem to work. I have a
non blocking NIO socket client connection I can send data to the
socket check the input buffer for data and handle it okay. If no
activity occurs in say 10 seconds, I do an input read. From reading
documentation, I would expect a 0 return value for a proper connection
with no data, a -1 return value or IOexception for a bad socket
connection. However, what is happening is that the socket connection
is still open on both sides, the read times out and generates an
IOexception error described as Read timed out. Does the JAVA examples
only work when the server is also a NIO object? I say this because
the server I am using is not written in JAVA. Any help or suggestions
would be greatly appreciated!
Thanks
Ryan
Somewhat new to JAVA, and I swear I have looked all over on this
problem, and found an answer, but it does not seem to work. I have a
non blocking NIO socket client connection I can send data to the
socket check the input buffer for data and handle it okay. If no
activity occurs in say 10 seconds, I do an input read. From reading
documentation, I would expect a 0 return value for a proper connection
with no data, a -1 return value or IOexception for a bad socket
connection. However, what is happening is that the socket connection
is still open on both sides, the read times out and generates an
IOexception error described as Read timed out. Does the JAVA examples
only work when the server is also a NIO object? I say this because
the server I am using is not written in JAVA. Any help or suggestions
would be greatly appreciated!
Thanks
Ryan