E
E
Elfino482016-08-05 22:51:16
Java
Elfino48, 2016-08-05 22:51:16

Do I need to open a port to run the server side of the chat on my computer?

Do I need to open a certain port on the computer so that other people can join your chat, enlighten the unenlightened please. And then in books that deal with sockets and connecting to the Internet, everything is explained at the localhost level, so such a question.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
Rou1997, 2016-08-05
@Elfino48

If they will connect from the same local network, for example, connect 2 computers connected to 1 router or modem, then you don’t need to configure anything at all, just find out the IP of the computer on this network and the server should “listen” to it, and from the second computer connect to the IP of the first .
If you connect via the Internet, then you need a global IP, this is the same IP that is used when accessing sites as a client, and you need to at least open ports and configure a firewall on the server, and the server can also be behind NAT then you need to buy from a provider "white" (external) IP for the server, and also the server's IP must be static. with dynamic, it’s problematic to connect and register a domain (IP changes all the time), and you still try the whip, and don’t forget to shoot the video and send it to me, in short, it’s easier and cheaper to use VPS / VDS.

S
Slavka, 2016-08-05
@Slavka_online

you need to capture the port in the server application, i.e. which port you will listen on, and this is up to you, but it's better not to occupy the standard ones.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question