Master Server

Location: programming\c++\cvs\polylib
Files: MasterServer.cpp - for all classes
Status: Working: Needs a few extra features

This is a set of classes that supports client/server connections to a master server to allow client programs to easily find servers.
Classes

CNetClient

Members
void		Connect();
void		Sync();
void		RandomServer(CSocket *);
int			Servers();
ServerInfo *Server(int ServerNumber);
Example
CNetClient NetClient;
CSocket Socket;
NetClient.Connect();
..
NetClient.Sync();
..
NetClient.RandomServer(&Socket);
or
Enumerate Servers
Status settings
SERVER_DISCONNECTED: Waiting for app to call Connect()
SERVER_CONNECTING: Following the application connection steps
SERVER_CONNECTED:  Client actually disconnected from master server and server information is ready for enumeration
SERVER_ERROR

Application Connection Steps (CNetClient)
  1. Connect to polyart to get master server IP
  2. Connect to master server to get server list
  3. Open dialog to allow user to select server
  4. Connect to selected server



Several classes are needed

Server GUI template

Location: programming\c++\ServerGUI
Files: ServerGUI.cpp,MasterServer.cpp

Status: Working: Needs a few extra features
This template will be used for both single server and the master server. It will contain a tray icon that will be green and turn red when there is a connection. Right clicking the icon will bring up a dialog box containing information. Right clicking the server will provide an exit option followed by an info option. As a template, it should be designed so that new server types can be easily plugged into it.

Server Dialog

Steps until completion(*=complete)
  1. *Get dialog up
  2. *Tray icon and make dialog appear when tray icon is clicked
  3. *Add server and make tray icon change color when a player has connected
  4. *Add exit when right clicked minimize server properties on exit

Server file format.

Commands



Client GUI Class

Location: programming\c++\ClientGUI
Files: ClientGUI.cpp,MasterServer.cpp
Status: Complete
This dialog will use the CNetClient class to obtain a list of severs. It will display the list and allow the player to choose a server.



Polyart.net server listing

Location: polyart.net/server/Servers.php
Location: polyart.net/server/AddServer.php
Location: programming\c++\cvs\polylib

Usage

Servers.php?Game=GameName
AddServer.php?IP=LanIP&Port=ServerPort&Game=GameName




Copyright 2004 © Polyart. All rights reserved.