Hello, I am making a simple chat program using Sockets.
I tested to put a server on my own computer and tried to connect to it using a client that also lies on my computer, works great!
Then i tried to put the "server" on my friends computer (we are within the same network) then it takes a while and i get the error:
*note: I have tested to forward a port but it still doesnīt work.

Quote

Exception in thread "main" java.net.SocketTimeoutException: connect timed out
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at Client.run(Client.java:32)
at Client.main(Client.java:14)