I'm posting my question here because I'm trying to find the solution by searching on internet and multiple network forum but I do not understand (maybe it's obvious).
I have a code with server and client and on local machine and it works. Trouble is when I try to have the server on my laptop one (192.168.0.10) and client on my second laptop (192.168.0.11).
Code on server :
Code: Select all
local socket = require('socket')
udp = socket.udp()
udp:setsockname('*', 6731)
udp:settimeout(0)
Code: Select all
local socket = require "socket"
local address, port = "localhost", 6731
udp = socket.udp()
udp:setpeername(address, port)
udp:settimeout(0)
I know that I need to use port forwarding on my router (e.g. apache works well on port 4513) and I added the rule but nothing happens. I assume the issue is before : when on my server side I try to see if 6731 is listening with netstat, I do not see anything (even with firewall fully turned off).
I have to admit, I'm lost and my question is more about network than lua but I'm maybe not the only one and maybe I'm missing something with UDP protocol.
I hope I will have a chance to understand this, I would like to enjoy my game with friends and for now I'm stucK.
Thank you in advance for your precious help, I'm looking forward to have news from you
Cheers
Alex