problem with the getlocalip

Discuss any general programming issues here

problem with the getlocalip

Postby xabierpayet » Fri Dec 16, 2016 5:47 am

with this code i need to know the ip of the machine running the server, but ip$ ever return 0.0.0.0

CreateServer(1,25000)
NPrint("Server connected")
ip$ = GetLocalip(1,#NETWORKSERVER)
NPrint(ip$)

is possible to know the real ip for make a connection between 2 different devices? (directly from hollywood, of course)
xabierpayet
 
Posts: 146
Joined: Fri Feb 24, 2012 10:34 am

Re: problem with the getlocalip

Postby xabierpayet » Fri Dec 16, 2016 11:59 pm

the 2 devices are 2 phones, and as i see in some forums, is not possible to open the ports of them (using 3 or 5G), and the connection is ever refused, enable blutooth in newer hollywood versions will be a good solution
xabierpayet
 
Posts: 146
Joined: Fri Feb 24, 2012 10:34 am

Re: problem with the getlocalip

Postby airsoftsoftwair » Sat Dec 17, 2016 2:45 pm

On phones there are some restrictions concerning port opening, of course. Nobody wants to have malware on his phone...
User avatar
airsoftsoftwair
 
Posts: 2025
Joined: Fri Feb 12, 2010 3:33 pm
Location: Germany

Re: problem with the getlocalip

Postby xabierpayet » Sun Dec 18, 2016 6:46 am

about the ip question, i still with the same problem and using this other code

iphost=gethostname()
iphost=toip(iphost)
nprint(iphost)

iphost print 192.168.137.1 instead of the 192.168.1.103 that say my router (as ip number)
is here another way to find it?
xabierpayet
 
Posts: 146
Joined: Fri Feb 24, 2012 10:34 am

Re: problem with the getlocalip

Postby airsoftsoftwair » Wed Dec 21, 2016 11:14 pm

On which system do you get this result?
User avatar
airsoftsoftwair
 
Posts: 2025
Joined: Fri Feb 12, 2010 3:33 pm
Location: Germany

Re: problem with the getlocalip

Postby xabierpayet » Wed Dec 21, 2016 11:18 pm

was an error in my router configuration, the server work perfect, and fast xD
how many connections can i have simultaneously in a server created with createserver?
xabierpayet
 
Posts: 146
Joined: Fri Feb 24, 2012 10:34 am

Re: problem with the getlocalip

Postby airsoftsoftwair » Thu Dec 22, 2016 1:07 am

Hollywood doesn't impose any limit here.
User avatar
airsoftsoftwair
 
Posts: 2025
Joined: Fri Feb 12, 2010 3:33 pm
Location: Germany

Re: problem with the getlocalip

Postby xabierpayet » Thu Dec 22, 2016 2:07 am

nice
xabierpayet
 
Posts: 146
Joined: Fri Feb 24, 2012 10:34 am


Return to General programming

Who is online

Users browsing this forum: No registered users and 1 guest

cron