Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
vdrift server
02-22-2007, 01:58 PM,
#23
 
done. I implemented the masterserver as stenyak said, plus I made the same for the clients

to sum up, the masterserver knows
_when a server go online
_when a server stop
_when a client connects (the server send the infos)
_when a client disconnects (idem)

plus there is a timeout. The server has to say hello every some time (here 100s). If it doesn't, it's assumed dead after some time (here 120s) and is kicked out

the masterserver http://nigoni60.perso.cegetel.net/vDrift/vDriftMS.php
the masterserver's code (PHP 4.3) http://nigoni60.perso.cegetel.net/vDrift...MS.php.txt
it's not atomic yet, I'll try to fix that

the additional code on the server side
Code:
MasterServer::Param msp;
msp.serverName = "My Beautiful Server";
msp.serverHost = "127.0.0.1"; // IP or host
msp.serverPassword = "nj6j3b0ko4";
msp.masterServerURL = "http://nigoni60.perso.cegetel.net/vDrift/vDriftMS.php";
TestDedicatedServer server(port, nbMaxClients, &msp);
// to use no masterserver :
// TestDedicatedServer server(port, nbMaxClients);

on the client side
Code:
MasterServerClient msc("http://nigoni60.perso.cegetel.net/vDrift/vDriftMS.php");
vector <...> servers = msc.refresh();

just going through servers :
Code:
2 servers online:
- My Beautiful Server (2 clients / 32, host 127.0.0.1:1300):
   - Alice
   - Bob
- Another Ugly Server (1 clients / 16, host 127.0.0.1:1301):
   - Eve

ok now you have time to figure out how to plug it on vDrift while I concentrate on my exams Wink
Reply


Messages In This Thread
vdrift server - by feldmaus - 07-24-2006, 03:37 PM
[No subject] - by uldics - 02-11-2007, 05:23 AM
[No subject] - by Nigo - 02-11-2007, 05:36 AM
[No subject] - by uldics - 02-11-2007, 07:15 AM
[No subject] - by Nigo - 02-11-2007, 11:46 AM
[No subject] - by thelusiv - 02-11-2007, 02:53 PM
[No subject] - by Nigo - 02-12-2007, 10:17 AM
[No subject] - by thelusiv - 02-12-2007, 09:43 PM
[No subject] - by Nigo - 02-13-2007, 08:28 AM
[No subject] - by thelusiv - 02-13-2007, 09:03 AM
[No subject] - by Nigo - 02-13-2007, 09:13 AM
[No subject] - by stenyak - 02-14-2007, 06:19 AM
[No subject] - by Nigo - 02-14-2007, 02:19 PM
[No subject] - by thelusiv - 02-14-2007, 06:06 PM
[No subject] - by stenyak - 02-14-2007, 06:18 PM
[No subject] - by thelusiv - 02-15-2007, 05:20 AM
[No subject] - by Nigo - 02-15-2007, 01:43 PM
[No subject] - by stenyak - 02-15-2007, 02:23 PM
[No subject] - by Nigo - 02-16-2007, 12:24 PM
[No subject] - by thelusiv - 02-16-2007, 09:24 PM
[No subject] - by Nigo - 02-19-2007, 09:57 AM
[No subject] - by thelusiv - 02-19-2007, 01:43 PM
[No subject] - by Nigo - 02-22-2007, 01:58 PM
[No subject] - by thelusiv - 02-23-2007, 03:19 PM
[No subject] - by Nigo - 02-25-2007, 09:39 AM
[No subject] - by thelusiv - 02-25-2007, 01:03 PM
[No subject] - by stenyak - 02-25-2007, 02:28 PM
[No subject] - by Nigo - 02-26-2007, 04:55 AM
[No subject] - by stenyak - 02-26-2007, 07:16 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)