not able to connect to server on internet
I have a very simple client server code written java(server listens on some port and client connects to server port and after connection is established, client ip is displayed on server console). This program is working very well in intranet, but if client and server are on internet, my server cannot detect it.I have no firewall installed on my client and server and开发者_Python百科 port forwarding is done on server(I can see it from canyouseeme.org).
Server is directly connected to modem along with other three computers(they are also connected to modem directly)
Please help me figure out why I am not able to detect client on internet.Thanks in advance.
Client code:
------------
String remoteIP = //remote ip
int port =1888;
try{
new Socket(remoteIp,port);
}catch(Exception e){
System.out.println(e.message());
}
Server code
-----------
ServerSocket serversocket = new ServerSocket(port);
Socket socket = serverSocket.accept();
displayIp(socket);
Check your proxy configurations on the client side, see http://download.oracle.com/javase/6/docs/technotes/guides/net/proxies.html
Which protocol do you use?
精彩评论