I code a program using love-0.10.2, and it worked fine.
I updated love-0.10.2 to love-11.1 a few days ago, and then I got a problem with tcp server, I just can NOT connected to tcp server in the program.
When I turn 11.1 to 0.10.2, the problem just gone, everything worked fine.
So, there may be a bug in love-11.1, or something different between 0.10.2 and 11.1 ?
Please help me, thanks a lot.
Socket problem with love-11.1
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Re: Socket problem with love-11.1
Check that your firewall isn't blocking v11. Other than that, it's hard to give a better answer with such little information.
Re: Socket problem with love-11.1
You may want to check the IP you're running server at.
In 0.10.x days I could easily start a server with a loopback IP while attempting to establish connection to a local IP. And that worked.
In 11.x it's impossible to connect to LAN IP if you ran server on a loopback IP.
If that's the case, then just use "*" as the server address.
Cheers.
In 0.10.x days I could easily start a server with a loopback IP while attempting to establish connection to a local IP. And that worked.
In 11.x it's impossible to connect to LAN IP if you ran server on a loopback IP.
If that's the case, then just use "*" as the server address.
Cheers.
Re: Socket problem with love-11.1
Thanks a lot.
Here are the code for setting up TCP-Server :
MacOSX-10.13.4 + Love-0.10.2 :
MacOSX-10.13.4 + Love-11.1 :
So, if I do NOT know the host ip, how can I configure the server ip in my program using love-11.1 ?
Here are the code for setting up TCP-Server :
Code: Select all
o.server = Socket.tcp()
o.server:settimeout(0)
-- local res, err = o.server:bind('*', 5688)
local res, err = o.server:bind('10.32.24.60', 5688)
if (res == nil) then error(err) end
o.server:listen(1)
Code: Select all
o.server:bind('*', 5688) -- 'getsockname()' got '0.0.0.0' as ip.
o.server:bind('10.32.24.60', 5688) -- 'getsockname()' got '10.32.24.60' as ip.
Code: Select all
o.server:bind('*', 5688) -- 'getsockname()' got a ':' as ip.
o.server:bind('10.32.24.60', 5688) -- 'getsockname()' got '10.32.24.60' as ip.
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: Socket problem with love-11.1
You can force binding to ipv4 instead of ipv6 by passing "0.0.0.0" as local ip. But binding to ipv6 usually doesn't mean ipv6-only...
Re: Socket problem with love-11.1
Thanks a lot, it is working fine now.
Who is online
Users browsing this forum: Semrush [Bot] and 8 guests