SLikeNet 0.1.3

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
SLNet::ConsoleServer Class Reference

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

`#include <slikenet/ConsoleServer.h>`

## Public Member Functions

| ConsoleServer ()
| ~ConsoleServer ()
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 | AddCommandParser (CommandParserInterface *commandParserInterface)
| Add an implementation of CommandParserInterface to the list of command parsers.
void | RemoveCommandParser (CommandParserInterface *commandParserInterface)
| Remove an implementation of CommandParserInterface previously added with AddCommandParser().
void | Update (void)
| Call update to read packet sent from your TransportInterface. You should do this fairly frequently.
void | SetPrompt (const char *_prompt)
| Sets a prompt to show when waiting for user input.

## Protected Member Functions

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

## Protected Attributes

TransportInterface * | transport
DataStructures::List < CommandParserInterface * > | commandParserList
char * | password [256]
char * | prompt

## Detailed Description

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

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 44 of file ConsoleServer.h.

## Constructor & Destructor Documentation

SLNet::ConsoleServer::ConsoleServer | ( |  | ) |

SLNet::ConsoleServer::~ConsoleServer | ( |  | ) |

## Member Function Documentation

void SLNet::ConsoleServer::AddCommandParser | ( | CommandParserInterface * | commandParserInterface | ) |

Add an implementation of CommandParserInterface to the list of command parsers.

Parameters

  [in] | commandParserInterface | The command parser referred to

void SLNet::ConsoleServer::ListParsers | ( | SystemAddress | systemAddress | ) |

protected

void SLNet::ConsoleServer::RemoveCommandParser | ( | CommandParserInterface * | commandParserInterface | ) |

Remove an implementation of CommandParserInterface previously added with AddCommandParser().

Parameters

  [in] | commandParserInterface | The command parser referred to

void SLNet::ConsoleServer::SetPrompt | ( | const char * | _prompt | ) |

Sets a prompt to show when waiting for user input.

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

Parameters

  [in] | _prompt | Null-terminated string of the prompt to use. If you want a newline, be sure to use /r/n

void SLNet::ConsoleServer::SetTransportProvider | ( | TransportInterface * | transportInterface,
|  | unsigned short | port
| ) |  |

Call this with a derivation of TransportInterface so that the console server can send and receive commands.

Parameters

  [in] | transportInterface | Your interface to use.
  [in] | port | The port to host on. Telnet uses port 23 by default. RakNet can use whatever you want.

void SLNet::ConsoleServer::ShowPrompt | ( | SystemAddress | systemAddress | ) |

protected

void SLNet::ConsoleServer::Update | ( | void |  | ) |

Call update to read packet sent from your TransportInterface. You should do this fairly frequently.

## Member Data Documentation

DataStructures::List<CommandParserInterface *> SLNet::ConsoleServer::commandParserList

protected

Definition at line 80 of file ConsoleServer.h.

char* SLNet::ConsoleServer::password[256]

protected

Definition at line 81 of file ConsoleServer.h.

char* SLNet::ConsoleServer::prompt

protected

Definition at line 82 of file ConsoleServer.h.

TransportInterface* SLNet::ConsoleServer::transport

protected

Definition at line 79 of file ConsoleServer.h.

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

- Source/include/slikenet/ConsoleServer.h