I am experimenting with writing/reading objects over sockets. When I set up both the server (who listens for a connection) and a client(who initiates a connection) on the same machine the server accepts the connection, gets the input stream and eventually the objectinputstream from the newly formed socket and the readObject method on the ObjectInoutStream on the server side reads the sent object without a problem. But when I have the server and the client running on different machines this process works a few times then I get a error on the readObject() method that indicates an unknown source and the connection gets reset and never works again.
I started just sending a
String object across the connection, but then decided to try to wrap that string in another object. Doing this doesn't seem to have helped.
Is this some network security issue or am I doing something fundamentally wrong:
client side:
Server Side: