Веб-сервер микроконтроллера

307

Предположим, A & B хочет общаться через Интернет, мы подключили Интернет от интернет-провайдера, и их IP-адрес не виден с удаленного компьютера, но тогда как на нашем компьютере работает такое приложение, как просмотрщик команд. это возможно только в том случае, если я размещаю веб-сайт с IP-адресом, который виден A & B, а затем A помещает свои данные в C, а B считывает их из C. A ---- <-> ---- C ----- <-> ------ B

я хочу знать, это правильный путь? как средство просмотра команды, приложение Skype общается с ПК на ПК

0

2 ответа на вопрос

1
Pete Kirkham

The pattern is usually that A&B would send a request to a relay server which is visible to both. As the requests are outgoing, the ISP doesn't require A or B to support incoming requests.

The simplest implementation is for the server to then act as an intermediary between the two. This creates some additional latency and server load.

Alternatively, the server may tell B or A try to create a connection to the other client. If either connection is possible - one of A or B's ISP is configured to allow incoming requests - then the conversation continues with the direct connection rather than being relayed through the server.

0
Tom L.

Basically yes, but it's not just the IP. Due to Firewalls, routers and so on you might want C to be able to handle all the traffic (and buffer it). C cannot rely on simply exchanging IP addresses.