Bennu Game Development

English Forums => Helpdesk => Topic started by: Grew on January 30, 2011, 05:43:18 PM

Title: BennuPlayNet distant connect (IP)
Post by: Grew on January 30, 2011, 05:43:18 PM
Hi,

Is there a way to make a distant connection with BennuPlayNet (for exemple by using the IP server address)

I've tried to change

if (!BNP_CONNECT("localhost",players,sizedata))
  return;
end;


with

if (!BNP_CONNECT("IP ADDRESS",players,sizedata))
  return;
end;


But it doesn't work.

Thanks!
Title: Re: BennuPlayNet distant connect (IP)
Post by: l1nk3rn3l on January 30, 2011, 07:02:37 PM
internet address
http://www.whatsmyip.org/


1. run server

2. connect client


if (!BNP_CONNECT("195.200.25.233",players,sizedata))
     return;
end;



Title: Re: BennuPlayNet distant connect (IP)
Post by: Grew on January 30, 2011, 08:37:29 PM
I tried but the client prog exits when trying to connect :(.
Title: Re: BennuPlayNet distant connect (IP)
Post by: Grew on January 30, 2011, 08:40:36 PM
Here are the logs:

Iniciando playNET
irrNetLite: Error: Connection timed out. Connection failed.
Creado Cliente. apuntando a xxx.xxx.xxx.xxx
Identificador Cliente: 0
finalizando playNET
finalizado playNET - OK


It works great in local network (and so with Hamachi).
Title: Re: BennuPlayNet distant connect (IP)
Post by: josebita on January 30, 2011, 11:14:24 PM
Firewall?
Title: Re: BennuPlayNet distant connect (IP)
Post by: Grew on January 30, 2011, 11:25:08 PM
Firewall is off, and no antivirus installed.
Title: Re: BennuPlayNet distant connect (IP)
Post by: josebita on January 31, 2011, 12:03:39 AM
Any hardware firewall? Like a router the server is connected to?
Title: Re: BennuPlayNet distant connect (IP)
Post by: Windgate on January 31, 2011, 02:20:09 AM
Bennuplaynet works fine, are you sure you are writing the IP correctly?

Try doing a ping to the same IP first.

You can also post the game and we could try.
Title: Re: BennuPlayNet distant connect (IP)
Post by: Grew on January 31, 2011, 10:29:56 AM
Ok there is a problem with my network I think. Ping to my IP address doesn't success.
I have no router.
Title: Re: BennuPlayNet distant connect (IP)
Post by: l1nk3rn3l on January 31, 2011, 03:39:53 PM
maybe,,,,

internet can be slow...

BNP_TIMEOUT= 15000;
BNP_REFRESH_MS= 1000;
BNP_FAST_MODE  =false;


if (!BNP_CONNECT("195.200.25.233",players,sizedata))
    return;
end;




please try with a http server how http://www.apachefriends.org/en/xampp-windows.html (http://www.apachefriends.org/en/xampp-windows.html)
if work you connection is ok....


Title: Re: BennuPlayNet distant connect (IP)
Post by: Grew on February 01, 2011, 08:46:18 AM
The problem is solved. It was because of my Freebox (it works as a router, and I didn't know).
Title: Re: BennuPlayNet distant connect (IP)
Post by: josebita on February 01, 2011, 12:20:26 PM
Great to know.