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: 104
Joined: Fri Apr 21, 2017 9:17 am

sock.lua, cannot create any server

Post by PGUp » Wed Jun 12, 2019 8:06 am

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: 720
Joined: Sat Apr 26, 2014 7:46 pm

Re: sock.lua, cannot create any server

Post by bobbyjones » Wed Jun 12, 2019 2:34 pm

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.
Do you frequently have great ideas but immediately lose them? Check out the MVP for my website called IdeaVault. It is designed to solve that problem. Desktop browsers only currently.

Post Reply

Who is online

Users browsing this forum: No registered users and 11 guests