Shadowrun: Awakened 29 September 2011 - Build 871
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
RakNet::ConsoleServer Class Reference

The main entry point for the server portion of your remote console application support. More...

#include <ConsoleServer.h>

List of all members.

Public Member Functions

void AddCommandParser (CommandParserInterface *commandParserInterface)
 Add an implementation of CommandParserInterface to the list of command parsers.
 ConsoleServer ()
void RemoveCommandParser (CommandParserInterface *commandParserInterface)
 Remove an implementation of CommandParserInterface previously added with AddCommandParser().
void SetPrompt (const char *_prompt)
 Sets a prompt to show when waiting for user input.
void SetTransportProvider (TransportInterface *transportInterface, unsigned short port)
 Call this with a derivation of TransportInterface so that the console server can send and receive commands.
void Update (void)
 Call update to read packet sent from your TransportInterface. You should do this fairly frequently.
 ~ConsoleServer ()

Static Public Member Functions

static void DestroyInstance (ConsoleServer *i)
static ConsoleServerGetInstance (void)

Protected Member Functions

void ListParsers (SystemAddress systemAddress)
void ShowPrompt (SystemAddress systemAddress)

Protected Attributes

DataStructures::List
< CommandParserInterface * > 
commandParserList
char * password [256]
char * prompt
TransportInterfacetransport

Detailed Description

ConsoleServer takes one TransportInterface and one or more CommandParserInterface (s) The TransportInterface will be used to send data between the server and the client. The connecting client must support the protocol used by your derivation of TransportInterface . TelnetTransport and RakNetTransport are two such derivations . When a command is sent by a remote console, it will be processed by your implementations of CommandParserInterface

Definition at line 32 of file ConsoleServer.h.


Constructor & Destructor Documentation

RakNet::ConsoleServer::ConsoleServer ( )
RakNet::ConsoleServer::~ConsoleServer ( )

Member Function Documentation

void RakNet::ConsoleServer::AddCommandParser ( CommandParserInterface commandParserInterface)
Parameters:
[in]commandParserInterfaceThe command parser referred to
static void RakNet::ConsoleServer::DestroyInstance ( ConsoleServer i) [static]
static ConsoleServer* RakNet::ConsoleServer::GetInstance ( void  ) [static]
void RakNet::ConsoleServer::ListParsers ( SystemAddress  systemAddress) [protected]
void RakNet::ConsoleServer::RemoveCommandParser ( CommandParserInterface commandParserInterface)
Parameters:
[in]commandParserInterfaceThe command parser referred to
void RakNet::ConsoleServer::SetPrompt ( const char *  _prompt)

Pass an empty string to clear the prompt Defaults to no prompt

Parameters:
[in]_promptNull-terminated string of the prompt to use. If you want a newline, be sure to use /r/n
void RakNet::ConsoleServer::SetTransportProvider ( TransportInterface transportInterface,
unsigned short  port 
)
Parameters:
[in]transportInterfaceYour interface to use.
[in]portThe port to host on. Telnet uses port 23 by default. RakNet can use whatever you want.
void RakNet::ConsoleServer::ShowPrompt ( SystemAddress  systemAddress) [protected]
void RakNet::ConsoleServer::Update ( void  )

Member Data Documentation

Definition at line 68 of file ConsoleServer.h.

char* RakNet::ConsoleServer::password[256] [protected]

Definition at line 69 of file ConsoleServer.h.

char* RakNet::ConsoleServer::prompt [protected]

Definition at line 70 of file ConsoleServer.h.

Definition at line 67 of file ConsoleServer.h.


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