R
R
RZ2020-08-18 22:20:09
Computer networks
RZ, 2020-08-18 22:20:09

What do you need to create a "messenger"?

Hello! I am a beginner programmer and recently decided to improve my skills. Why messenger? Because I want to sort out networking. I immediately went to Google and found socket servers. I started to figure it out and I managed to make a chat (only console so far), it even works on 2 computers, but within the local network (. I would like to know if it is possible to go beyond the local network and if so, how and what you need to know for Thank you

Strictly do not judge, I am a beginner and this is the first time I have dealt with such

Answer the question

In order to leave comments, you need to log in

4 answer(s)
S
SKEPTIC, 2020-08-18
@pro100chel

To go beyond the local network, you need to have an intermediary. This intermediary is a server.
We have 2 users and a server. The user connects to the server and sends messages to it. The server receives these messages and sends them to another user.

G
Griboks, 2020-08-19
@Griboks

Break the task into subtasks and dig each one. For example: nat bypass, security and encryption, multiplexing, routing, compression, etc.

A
Alexey, 2020-09-04
@Demanoidos

To go beyond the local network, you must connect not to a local IP (192.168.10.1 for example), but to an external, "white" IP address.
Your provider can give you such an address for a small amount of money and assign it to your router, through which you distribute the Internet in the office.
On the router, do port forwarding (port mapping) from external IP to internal, in your local network, where you have a server running, on a given TCP port (if your chat works over TCP).
From now on, you will be able to connect to your chat server via the Internet, from home, for example. There are still little things like firewalls / antiviruses on the server, but you will already configure them if you master the port mapping. It's trivial.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question