Answer the question
In order to leave comments, you need to log in
How to connect to server from client?
How to connect from the client to the server, if you do it all locally, then the code works, but if from another computer, then the
client cannot connect. It seems to me that the problem is in the IP address, although it seems to be correct, but if you ping it, it simply does not respond.
What could be the problem ?
client
server
Answer the question
In order to leave comments, you need to log in
You need a new ip for the server. The one you enter is issued to your computer by the router and is not visible "from the outside".
In order to correctly test the server from the outside, use the external IP of the gateway.
www.whatsmyip.org Here you can see.
If you are using a router, then you most likely need to set up port forwarding in it.
In your case, it will be necessary to forward requests from the outside to port 9800 to the computer on the home network on which the server is running.
www.dlink.ee/en/faq/68/275.html - example for d-link routers You
may still have to open a port for external requests in the oc firewall.
windows.microsoft.com/en-us/windows/open-port-wind... - instructions for Windows
Ping is not an indicator. An IP address is like a house that has ( ports ) apartments. Try to attach from the client from the command line telnet 192.168.1.100 1234 , where 1234 is the port on the server. Also check your firewall.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question