sock.lua, cannot create any server

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
PGUp
Party member
Posts: 105
Joined: Fri Apr 21, 2017 9:17 am

sock.lua, cannot create any server

Post 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
-
bobbyjones
Party member
Posts: 730
Joined: Sat Apr 26, 2014 7:46 pm

Re: sock.lua, cannot create any server

Post 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.
leankyr
Prole
Posts: 6
Joined: Sun Nov 08, 2020 6:09 pm

Re: sock.lua, cannot create any server

Post by leankyr »

Can I bind to the public IP?
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 17 guests