Hi, I am trying to program a simple server/client socket connection program, the main function is to send and receive objects between them. I somehow went wrong and the connection between them keeps terminating right after establishing connection. Is there anything I can do to resolve this? This is gonnna be kinda long post.. sorry. These are the code that starts and ends the socket connection. I'm kinda desperate for this to work.. so thanks in advance. appinterface.java:
Hello, I have got a answer to solve this problem: The best way to create a dead lock is to try to read from both ends of a stream at the same time. I assume that the code for your server and your client are both attempting to get the ObjectInputStream before getting the ObjectOutputStream. Basically, all you have to do to fix this problem is put the getObjectOutputStream line BEFORE the getObjectInputStream line.. Hope this helps!
I am going down to the lab. Do NOT let anyone in. Not even this tiny ad: