I am trying to make a client-server program in Java. Actually clients can get in touch with my server computer since the forwarding is set for port 7777 on my router. Therefore, I get their messages fine. Once I get a message from a client I keep the socket object open (I don't close any Input or Output stream) and then try to send a message back. I do not get any exceptions at all so I am pretty sure the message is delivered fine to the socket's IP, I have even tried sending and answering with my own server computer and it works fine. So what is going on is that by keeping the socket I do know the IP address from the client and the message gets to the client's router fine. What I think is not happening is that the router does not deliver the message to that client since it does not have to know it. I am kind of lost right now, it is driving me crazy now. Thanks
Asked
Active
Viewed 207 times
0
-
1Show us the code. Or better still, just the relevant parts of the code. – Stephen C May 25 '13 at 06:39
-
How are you testing this? Telnet to your server? – Stefan Haustein May 25 '13 at 06:51
-
I would advise to `ping` both the server and the client to see if they are reachable from both ends – Extreme Coders May 25 '13 at 07:33