## A problem with Sock.lua library

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.
SkippyDip
Prole
Posts: 3
Joined: Thu Oct 10, 2019 7:40 pm

### A problem with Sock.lua library

Hi, I have this problem that might sound stupid but I've been stuck with it for a long while now.
I am using a library called Sock.lua (https://github.com/camchenry/sock.lua) and I have a problem with public host/self-hosting

Code: Select all

server = sock.newServer("IP HERE", 22122)
What IP do I use? I tried my public IP and it gave this error:
Failed to create the host. is there another server running on 22122?
I can local-host fine but I can't public-host..

raidho36
Party member
Posts: 2063
Joined: Mon Jun 17, 2013 12:00 pm

### Re: A problem with Sock.lua library

Address indicates on which IP the server is going to run. You usually want to use asterisk ( "*" ) or "localhost" for server IP when you create it.

pgimeno
Party member
Posts: 2227
Joined: Sun Oct 18, 2015 2:58 pm

### Re: A problem with Sock.lua library

"*" fails with some libraries on some systems. 0.0.0.0 should work fine across platforms. localhost is not guaranteed to work for anything other than your own computer.

SkippyDip
Prole
Posts: 3
Joined: Thu Oct 10, 2019 7:40 pm

### Re: A problem with Sock.lua library

But I wanna make it so people around the world can connect to the server/IP, I don't want to localhost.

pgimeno
Party member
Posts: 2227
Joined: Sun Oct 18, 2015 2:58 pm

### Re: A problem with Sock.lua library

Use 0.0.0.0

SkippyDip
Prole
Posts: 3
Joined: Thu Oct 10, 2019 7:40 pm

### Re: A problem with Sock.lua library

Okay, thank you so much for the help.

### Who is online

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