Sockets and IOException
I’m writing a dependable system. I’m having problems:
- I’m writing it in java. (Yes I know it isn’t Cocoa, but I’m deploying cross-platform)
- I have a thread to deal with server communication. (Thank god for synchronized methods.
- The communication thread spawns another thread to send out a keep-alive ping. (Can’t I just set a reasonable SO_KEEPALIVE time, instead of 2 hours?)
When I close the server down at the network end, the ping thread continues to write my ping object to the output stream, without throwing an exception. How on earth is this even possible? Answers on a postcard, or leave a comment below……..
Technorati Tags:
Java, Java Network Programming