Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 945 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: [ANet or other maybe] Auto-remove dead servers from serverlist [Re: Dark_samurai] #344827
10/20/10 22:12
10/20/10 22:12
Joined: Jun 2001
Posts: 1,004
Dossenbach
N
nfs42 Offline
Serious User
nfs42  Offline
Serious User
N

Joined: Jun 2001
Posts: 1,004
Dossenbach
GSTChannels uses php/mysql on a http-server to register servers.
every 60 secs the different 3dgs gstnet servers execute a non-blocking http request to update various properties for the appropriate server in the list with a timestamp.

the serverlist call is also an http request which execute at first a query to delete those servers where the last timestamp is older than 120 seconds (gui or non gui version).

that should work for most mp games.


Andreas
GSTools - Home of
GSTScript 0.9.8: lua scripting for A6/7/8
GSTNet 0.7.9.20: network plugin for A6/7/8
GSTsqlite 1.3.7: sql database plugin for A6/7/8
3DGS Codebase: 57 snippets || 3DGS Downloads: 248 files
Re: [ANet or other maybe] Auto-remove dead servers from serverlist [Re: nfs42] #349056
12/03/10 15:14
12/03/10 15:14
Joined: Mar 2006
Posts: 3,538
WA, Australia
J
JibbSmart Offline
Expert
JibbSmart  Offline
Expert
J

Joined: Mar 2006
Posts: 3,538
WA, Australia
Hey guys,

I've got a similar set-up for my serverlist (PHP and MySQL). I want to prevent servers behind routers that haven't set up port-forwarding from being able to create an online server, but I don't actually know anything about socket programming (neither A8 socket programming nor what to do on the PHP side).

Can anyone give me some hints? I can normally get through things by some trial and error, but this time I'm trying to solve 3 problems, and I won't know if any of them work until they all work:
1. Being able to receive information on A8's side;
2. Being able to send information from the PHP serverlist;
3. Port-forwarding on my own machine -- I'm behind a router, and while I think I've set it up I don't have a way of testing that it works :S

Thanks,

Jibb


Formerly known as JulzMighty.
I made KarBOOM!
Re: [ANet or other maybe] Auto-remove dead servers from serverlist [Re: JibbSmart] #349130
12/04/10 09:00
12/04/10 09:00
Joined: Jul 2005
Posts: 1,930
Austria
Dark_samurai Offline
Serious User
Dark_samurai  Offline
Serious User

Joined: Jul 2005
Posts: 1,930
Austria
You could do this without writing your own socket program. You could let the game server open a "test server" before the real game server is started. Then this server sends a http_post() for calling a php script on the php/mysql server. This script starts a client.exe that tries to connect with the "test server" (so you should send the port of the game server to the script; you can get the ip address through a php instruction). If the connection is successful, the client.exe calls a php script on the localhost (because the php server and the client.exe run on the same machine) and this script adds the server to the list. If the connection event is called on your game server it knows that the client could successfully connect. => the "test server" is closed and the real server is started.

Shouldn't be to hard to implement with ANet. Just a few lines of code wink Also the php part is easy.


ANet - A stable and secure network plugin with multi-zone, unlimited players, voip, server-list features,... (for A7/A8)!
get free version
Re: [ANet or other maybe] Auto-remove dead servers from serverlist [Re: Dark_samurai] #349178
12/04/10 17:18
12/04/10 17:18
Joined: Mar 2006
Posts: 3,538
WA, Australia
J
JibbSmart Offline
Expert
JibbSmart  Offline
Expert
J

Joined: Mar 2006
Posts: 3,538
WA, Australia
Thanks, I like the idea, but I'm using a free (for now) PHP/MySQL host, and while relatively soon I'm going to use a paid host, I'm still aiming for something really cheap (and thus it's really just PHP/MySQL). I'm not actually hosting the server myself, so I don't think I have enough freedom with it to run executables on the serverlist server.

Any code snippets or small examples from anyone for having A8 communicate with a PHP server through socket_connect?

I really have no idea.

Jibb


Formerly known as JulzMighty.
I made KarBOOM!
Page 2 of 2 1 2

Moderated by  HeelX, Spirit 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1