Socket closing unexpectedly?
843790Mar 4 2009 — edited Mar 6 2009I'm really new to networking with sockets, so I don't really know where to even start debugging this...
I'm creating a pretty simple client/server pair which communicate with serialized objects. So far the server seems to run fine. My problem is when running my client it creates the socket and output stream to the socket fine, but when I try write to it I get "SocketException: Socket closed". I'm confused why creation works fine but writing does not. Also, if I uncomment my code to create the input stream from the socket that will hang and will never complete. One possibility: I'm trying to run both client and server on my desktop for testing - would this create these symptoms? If not, any suggestions on how I can fix this?