Hi,
I was working on a client server issue and did the following in the client code:
DatagramSocket socket = new DatagramSocket( );
socket.setSoTim eout(1000);
.....
DatagramPacket pkt = new DatagramPacket( message, message.length, address, port);
socket.send(pkt );
where address and port are command line args and are of the server.
When the server is run on my machine i.e host address is 127.0.0.1, this works fine. but when i try to run the server on another machine and the client on mine. this just doest work. my packets do not reach the server. what am i missing here with respect to ip addresses? Please help.
I was working on a client server issue and did the following in the client code:
DatagramSocket socket = new DatagramSocket( );
socket.setSoTim eout(1000);
.....
DatagramPacket pkt = new DatagramPacket( message, message.length, address, port);
socket.send(pkt );
where address and port are command line args and are of the server.
When the server is run on my machine i.e host address is 127.0.0.1, this works fine. but when i try to run the server on another machine and the client on mine. this just doest work. my packets do not reach the server. what am i missing here with respect to ip addresses? Please help.
Comment