Answer the question
In order to leave comments, you need to log in
Java Sockets. Client - Server. Why does not it work?
In general, I decided to learn the basics of working with sockets in Java.
Wrote a simple prog server. It listens on a port, and incoming text sends back a connection number assignment.
Also wrote a simple prog client. It sends plain text to the specified address and port and displays the server response or an error.
So here's the crux of the matter.
When the server is running, I send data to localhost, everything works, when I send it to the ip that the router gave me 192.168.0.100, everything also works, but when I send it to my real ip taken from 2ip.ru, nothing works. Turned off the firewall, same thing.
Please tell me what is the problem?
Answer the question
In order to leave comments, you need to log in
You would start with networks, not with sockets.
Who will do PORT FORWARDING?
Let's say you have three computers in your LAN. When a request arrives at the router, the router must know which of the three ports to send the request to - port forwarding is responsible for this.
What model of router do you have?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question