Shadowrun: Awakened 29 September 2011 - Build 871
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
cat::sphynx::Server Class Reference

#include <SphynxServer.hpp>

Inheritance diagram for cat::sphynx::Server:

List of all members.

Public Member Functions

u32 GetTotalPopulation ()
 Server ()
bool StartServer (ThreadPoolLocalStorage *tls, Port port, u8 *public_key, int public_bytes, u8 *private_key, int private_bytes, const char *session_key)
virtual ~Server ()

Static Public Member Functions

static bool GenerateKeyPair (ThreadPoolLocalStorage *tls, const char *public_key_file, const char *private_key_file, u8 *public_key, int public_bytes, u8 *private_key, int private_bytes)

Protected Member Functions

virtual bool AcceptNewConnexion (const NetAddr &src)=0
ConnexionLookup (u32 key)
virtual ConnexionNewConnexion ()=0

Private Member Functions

ServerWorkerFindLeastPopulatedPort ()
void OnClose ()
void OnRead (ThreadPoolLocalStorage *tls, const NetAddr &src, u8 *data, u32 bytes)
void OnWrite (u32 bytes)

Private Attributes

Map _conn_map
CookieJar _cookie_jar
KeyAgreementResponder _key_agreement_responder
u8 _public_key [PUBLIC_KEY_BYTES]
Port _server_port
char _session_key [SESSION_KEY_BYTES]
int _timer_count
ServerTimer ** _timers
int _worker_count
ServerWorker ** _workers

Static Private Attributes

static const int SESSION_KEY_BYTES = 32
static const int WORKER_LIMIT = 32

Detailed Description

Definition at line 244 of file SphynxServer.hpp.


Constructor & Destructor Documentation

cat::sphynx::Server::Server ( )
virtual cat::sphynx::Server::~Server ( ) [virtual]

Member Function Documentation

virtual bool cat::sphynx::Server::AcceptNewConnexion ( const NetAddr src) [protected, pure virtual]
ServerWorker* cat::sphynx::Server::FindLeastPopulatedPort ( ) [private]
static bool cat::sphynx::Server::GenerateKeyPair ( ThreadPoolLocalStorage tls,
const char *  public_key_file,
const char *  private_key_file,
u8 public_key,
int  public_bytes,
u8 private_key,
int  private_bytes 
) [static]
u32 cat::sphynx::Server::GetTotalPopulation ( )
Connexion* cat::sphynx::Server::Lookup ( u32  key) [protected]
virtual Connexion* cat::sphynx::Server::NewConnexion ( ) [protected, pure virtual]
void cat::sphynx::Server::OnClose ( ) [private, virtual]

Implements cat::UDPEndpoint.

void cat::sphynx::Server::OnRead ( ThreadPoolLocalStorage tls,
const NetAddr src,
u8 data,
u32  bytes 
) [private, virtual]

Implements cat::UDPEndpoint.

void cat::sphynx::Server::OnWrite ( u32  bytes) [private, virtual]

Implements cat::UDPEndpoint.

bool cat::sphynx::Server::StartServer ( ThreadPoolLocalStorage tls,
Port  port,
u8 public_key,
int  public_bytes,
u8 private_key,
int  private_bytes,
const char *  session_key 
)

Member Data Documentation

Definition at line 263 of file SphynxServer.hpp.

Definition at line 265 of file SphynxServer.hpp.

Definition at line 266 of file SphynxServer.hpp.

Definition at line 267 of file SphynxServer.hpp.

Definition at line 262 of file SphynxServer.hpp.

Definition at line 260 of file SphynxServer.hpp.

Definition at line 274 of file SphynxServer.hpp.

Definition at line 273 of file SphynxServer.hpp.

Definition at line 271 of file SphynxServer.hpp.

Definition at line 270 of file SphynxServer.hpp.

const int cat::sphynx::Server::SESSION_KEY_BYTES = 32 [static, private]

Definition at line 259 of file SphynxServer.hpp.

const int cat::sphynx::Server::WORKER_LIMIT = 32 [static, private]

Definition at line 269 of file SphynxServer.hpp.


The documentation for this class was generated from the following file:

Copyright © 2007-2010 by The Shadowrun: Awakened Team. This work is licensed under the GNU Lesser General Public License 3.

GNU Lesser General Public License 3 Sourceforge.net