Freezing problem when using Socket/ServerSocket
I'm trying to make something client/server with the classes Socket and ServerSocket. However, I can't get it to work. If I take examples from the internet, it doesn't work, if I take the official Sun examples, doesn't work either, same with homemade stuff. I'll explain.
Let's say I use those from Sun:
http://java.sun.com/docs/books/tutorial/networking/sockets/example-1dot1/KnockKnockClient.java
http://java.sun.com/docs/books/tutorial/networking/sockets/example-1dot1/KnockKnockProtocol.java
http://java.sun.com/docs/books/tutorial/networking/sockets/example-1dot1/KnockKnockServer.java
Those 3 classes should compile. What I do is replace the "taranis"" in KnockKnockClient for the name of my computer since I'm trying to run both the server side and client side on the same computer. After those compile, I run the server one first, as it should be. It stops on that line as it should be:
"clientSocket = serverSocket.accept();"
Then I run the client one, and it automatically freezes. I tried changing the port numbers just in case and it's the same thing. I have no idea what the problem could be.
Thanks for the help.

