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
Post
by SkippyDip » Thu Oct 10, 2019 7:59 pm
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..
Please help, thx.
raidho36
Party member
Posts: 2063 Joined: Mon Jun 17, 2013 12:00 pm
Post
by raidho36 » Thu Oct 10, 2019 11:30 pm
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: 3656 Joined: Sun Oct 18, 2015 2:58 pm
Post
by pgimeno » Fri Oct 11, 2019 9:20 am
"*" 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
Post
by SkippyDip » Fri Oct 11, 2019 10:54 am
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: 3656 Joined: Sun Oct 18, 2015 2:58 pm
Post
by pgimeno » Fri Oct 11, 2019 10:58 am
Use 0.0.0.0
SkippyDip
Prole
Posts: 3 Joined: Thu Oct 10, 2019 7:40 pm
Post
by SkippyDip » Fri Oct 11, 2019 10:59 am
Okay, thank you so much for the help.
Users browsing this forum: Ahrefs [Bot] , Bing [Bot] , Google [Bot] and 9 guests