problem with the getlocalip

Discuss any general programming issues here
Post Reply
xabierpayet
Posts: 267
Joined: Fri Feb 24, 2012 9:34 am

problem with the getlocalip

Post by xabierpayet »

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: 267
Joined: Fri Feb 24, 2012 9:34 am

Re: problem with the getlocalip

Post by xabierpayet »

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
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: problem with the getlocalip

Post by airsoftsoftwair »

On phones there are some restrictions concerning port opening, of course. Nobody wants to have malware on his phone...
xabierpayet
Posts: 267
Joined: Fri Feb 24, 2012 9:34 am

Re: problem with the getlocalip

Post by xabierpayet »

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?
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: problem with the getlocalip

Post by airsoftsoftwair »

On which system do you get this result?
xabierpayet
Posts: 267
Joined: Fri Feb 24, 2012 9:34 am

Re: problem with the getlocalip

Post by xabierpayet »

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?
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: problem with the getlocalip

Post by airsoftsoftwair »

Hollywood doesn't impose any limit here.
xabierpayet
Posts: 267
Joined: Fri Feb 24, 2012 9:34 am

Re: problem with the getlocalip

Post by xabierpayet »

nice
Post Reply