[
[
C++ / C#

Why doesn't the client connect to the server on the local network?

There is an online chat which is written in C#. Consists of two parts: server and client. The client is rummaged on 127.0.0.1:2222, the client is connected to this address. This works on one machine, but if you run it on the local network - on one PC the server and client, and on the other the client, then the client does not connect to the server. If I change the address from 127.0.0.1 to another one (the address of a server on the local network), I get a compile-time error that the address does not fit the context. Implementation - on sockets. Project - https://github.com/vyacheslavbevz/online_chat_bevz_

Answer the question

In order to leave comments, you need to log in

1 answer(s)
[
[email protected]&a qkcUv*6=KygEm, 2020-01-13
@KrasPvP

I found the solution here
I configured the addresses 192.168.1.1 and 192.168.1.2 on virtual machines, everything worked.
Plus, on virtual machines, you need to configure the network correctly (it started up normally from 8 times for me)
On both virtual machines, it should be identical
5e1c876dbfdf7511509317.png

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question