I'm trying to do a very basic echo server using java sockets, it works perfectly locally(running both the server and client on the same computer), when I try to run the client from another computer i get the exception :
Couldn't get I/O for the connection to XXX.XXX.XX.X
XXX.XXX.XX.X being the IP of the machine on which the server is running
btw : my code for both the server and the client is roughly that of the oracle beginner tutorials : server client
EDIT : The full stacktrace I get :
java.net.ConnectException: Connection timed out: connect
at java.net.DualStackPlainSocketImpl.connect0(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at sockets.Client.main(Client.java:16)