$treeview $search $mathjax
Stratagus  2.2.6
$projectbrief
$projectbrief
$searchbox
-->
         _________ __                 __
        /   _____//  |_____________ _/  |______     ____  __ __  ______
        \_____  \\   __\_  __ \__  \\   __\__  \   / ___\|  |  \/  ___/
        /        \|  |  |  | \// __ \|  |  / __ \_/ /_/  >  |  /\___ \
       /_______  /|__|  |__|  (____  /__| (____  /\___  /|____//____  >
               \/                  \/          \//_____/            \/
    ______________________                           ______________________
                          T H E   W A R   B E G I N S
           Stratagus - A free fantasy real time strategy game engine

metaserver/netdriver.h File Reference

#include <time.h>
#include "net_lowlevel.h"

Go to the source code of this file.


Classes

class  ServerStruct
class  Session
class  SessionPool

netdriver.h - Net driver header.

#define DEFAULT_PORT   7775
#define DEFAULT_MAX_CONN   500
#define DEFAULT_SESSION_TIMEOUT   900
#define DEFAULT_POLLING_DELAY   250
#define MAX_USERNAME_LENGTH   32
#define MAX_PASSWORD_LENGTH   32
#define MAX_GAMENAME_LENGTH   32
#define MAX_VERSION_LENGTH   8
ServerStruct Server
SessionPoolPool
 external reference to session tracking.
void Send (Session *session, const char *msg)
int ServerInit (int port)
void ServerQuit (void)
int UpdateSessions (void)

Define Documentation

#define DEFAULT_MAX_CONN   500

#define DEFAULT_POLLING_DELAY   250

#define DEFAULT_PORT   7775

#define DEFAULT_SESSION_TIMEOUT   900

#define MAX_GAMENAME_LENGTH   32

#define MAX_PASSWORD_LENGTH   32

#define MAX_USERNAME_LENGTH   32

#define MAX_VERSION_LENGTH   8


Function Documentation

void Send ( Session session,
const char *  msg 
)

Send a message to a session

Parameters:
session Session to send the message to
msg Message to send

int ServerInit ( int  port  ) 

Initialize the server

Parameters:
port Defines the port to which the server will bind.
Returns:
0 for success, non-zero for failure

void ServerQuit ( void   ) 

ServerQuit: Releases the server socket.

int UpdateSessions ( void   ) 

Accepts new connections, receives data, manages buffers,


Variable Documentation

external reference to session tracking.

(C) Copyright 1998-2011 by The Stratagus Project under the GNU General Public License.
All trademarks and copyrights on this page are owned by their respective owners.