Jump to content

  • Log In with Google      Sign In   
  • Create Account

#ActualSimonForsman

Posted 24 June 2013 - 02:46 PM

If your machines are on the same network your router has to allow NAT loopback/ for you to be able to use the public IP (not all routers support it and when it is supported it is normally disabled by default), if its not supported you will have to use the LAN ip when the client is on the same network as the server.

 

The server should always respond on the same socket it recieves from (otherwise firewalls will block the traffic) (a fairly common mistake is to open 2 sockets on the client (one to send and one to recieve, and that just won't work), the server gets the correct port and ip to send to from the recvfrom call.


#2SimonForsman

Posted 24 June 2013 - 02:44 PM

If your machines are on the same network your router has to allow NAT loopback/ for you to be able to use the public IP (not all routers support it and when it is supported it is normally disabled by default), if its not supported you will have to use the LAN ip when the client is on the same network as the server.

 

The server should always respond on the same socket it recieves from (otherwise firewalls will block the traffic) (a fairly common mistake is to open 2 sockets on the client (one to send and one to recieve, and that just won't work)


#1SimonForsman

Posted 24 June 2013 - 02:42 PM

If your machines are on the same network your router has to allow NAT loopback/ for you to be able to use the public IP (not all routers support it and when it is supported it is normally disabled by default), if its not supported you will have to use the LAN ip when the client is on the same network as the server.


PARTNERS