Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Multisync problem

Author
Message
zydeoN
15
Years of Service
User Offline
Joined: 25th Sep 2009
Location:
Posted: 28th Oct 2009 21:45 Edited at: 28th Oct 2009 21:46
Hi, i started using multisync today, but i am having a problem... I created server and client apps, and i am able to host a game in the server app, but cant connect to it with client on another computer. Maybe that is because i have a router, and i could have some ports blocked. Besides, there is no documentation about that in C++...
Client:


Server:


Btw, how does NetGetError() work ? It doesnt return a string or something...
Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 29th Oct 2009 00:01 Edited at: 29th Oct 2009 00:01
See this thread for some information.

If you're using 127.0.0.1 then you can only connect a client on the same computer, as that address bypasses any networking card you have installed. Specifying 0.0.0.0 on the server and the servers's LAN IP on the client should work (assuming you want to connect from another computer on your LAN).

The server needs to regularly call NetPlayerJoined to check if players have joined, but more importantly it also allows players to join. The same applies for NetPlayerLeft.
zydeoN
15
Years of Service
User Offline
Joined: 25th Sep 2009
Location:
Posted: 29th Oct 2009 01:41
Thanks, it works now, but the amount of players is always zero...
Server:


Also, if i see the ipadress of this computer on internet, can i use it as the server ip adress so other players can join it, somewhere else ?
Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 30th Oct 2009 01:19
In that snippet you're still using 127.0.0.1.

Quote: "Also, if i see the ipadress of this computer on internet, can i use it as the server ip adress so other players can join it, somewhere else ?"


Not sure what you mean, could you rephrase that?
zydeoN
15
Years of Service
User Offline
Joined: 25th Sep 2009
Location:
Posted: 30th Oct 2009 01:24 Edited at: 30th Oct 2009 01:24
Yes, i was using 127, but tested to connect to server on the same computer...
For example, my IP address is 213.13.200.6 from (http://whatismyipaddress.com/) Can i use it as the ip of the server app, so other players can join the game online?
Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 30th Oct 2009 01:32
Quote: "For example, my IP address is 213.13.200.6 from (http://whatismyipaddress.com/) Can i use it as the ip of the server app, so other players can join the game online?"


If you're asking if you can use it in NetHost_IP, the answer is no unless you are directly connected to the internet (without a router, which is rare these days). In order for users on the internet to connect you need to either use your computer's LAN IP, or 0.0.0.0 as it's easier. Users on the internet then connect using your internet IP.

Login to post a reply

Server time is: 2024-11-20 11:45:37
Your offset time is: 2024-11-20 11:45:37