O
opalpa
I've written socket code previously and am confronted with a new
situation: I have a server which manages multiple connections and each
connections can be reused for multiple messages. The client does not
say anything before closing, it just closes. What is the correct way
to determine that client closed socket?
I've looked at java.net.socket 1.5 documentation and it is much too
imprecise for my understanding. Like does isClosed() mean that close()
was called on instance? Does it mean that specific symbols were
received by instance from client?
It seems that more commonly protocols have explicit messages informing
of closing, however in my circumstances changing protocols is not an
option.
Looking forward to replies.
situation: I have a server which manages multiple connections and each
connections can be reused for multiple messages. The client does not
say anything before closing, it just closes. What is the correct way
to determine that client closed socket?
I've looked at java.net.socket 1.5 documentation and it is much too
imprecise for my understanding. Like does isClosed() mean that close()
was called on instance? Does it mean that specific symbols were
received by instance from client?
It seems that more commonly protocols have explicit messages informing
of closing, however in my circumstances changing protocols is not an
option.
Looking forward to replies.