Page 1 of 1
sock.lua, cannot create any server
Posted: Wed Jun 12, 2019 8:06 am
by PGUp
Code: Select all
local sock = require 'sock'
function love.load()
server = sock.newServer("192.168.100.1", 22122)
end
Code: Select all
Error
sock.lua:1327: Failed to create the host. Is there another server running on :22122?
Traceback
[C]: in function 'error'
sock.lua:1327: in function 'newServer'
main.lua:16: in function 'load'
[C]: in function 'xpcall'
[C]: in function 'xpcall'
using other library does not work either, I'm suspecting this is not the program's fault but something else, my lan cable is correctly plugged to my router, I've changed the port multiple times, used public and private ip adress, switching firewall on and off, force stopping programs that might create servers, still wont work. it works yesterday perfectly and it wont work today, I did not changed a single letter from the code, possible solutions?
and another odd thing, i can only seem to create server with devices connected to my router with physical lan cable but not the wireless one
Re: sock.lua, cannot create any server
Posted: Wed Jun 12, 2019 2:34 pm
by bobbyjones
See my response to your other post. You have to bind to an IP address available on your machine. such as localhost. You can also look at network properties if you are using windows. Use the IP address from the currently operational network connection.
Re: sock.lua, cannot create any server
Posted: Sat Feb 06, 2021 1:05 pm
by leankyr
Can I bind to the public IP?