There are two Linux machines connected to the same Wi-Fi router. You need to implement an echo server on them in C \ C ++. I have one IP on both machines. The question is: how can I get the real server address so that I can connect to it?

I tried to google into the forehead like эхо-сервер wifi - I didn't find anything sensible on the topic. So even if you tell me the correct Google request on this topic, I will be very happy.

  • 2
    But is there any difference for a socket to send by wire or air ??? - Alex.B
  • one
    IP у меня один на обе машины. - in the sense of external ip? or one ip inside the network? - KoVadim
  • @KoVadim External. - Shadr
  • It seems that you want to connect to your server from the outside world. Then you need to do port forwarding on the router. This can be done as pens in the admin, still upnp. The fact that you need to have a real external ip, I think you should know. - KoVadim
  • one
    the fact that you have one external ip for two does not mean anything. They have internal IPs that must be unique within the local network (if they are the same, then you have a problem and you need to fix it immediately). You can view your ip in the console using the ifconfig command. And then take any example client server and forth. - KoVadim

0