TelnetConsole Class Reference#include <telnetConsole.h>
List of all members.
Detailed Description
Telnet admin console.
Torque supports remote access to its console. This is most useful when running a dedicated server, as you can remotely administer the game (for instance, kicking people). In the context of a MMORPG, this sort of functionality would be useful for managing a server.
There are a number of products for Tribes2 which allow remote administration via a nice GUI. Using the Telnet Console
The TelnetConsole is designed to be used globally, so you don't instantiate it like a normal class. Instead, you allow it to manage itself:
|
Public Member Functions |
| void | process () |
| | Called by the main loop to let the console process commands and connections.
|
| void | setTelnetParameters (S32 port, const char *telnetPassword, const char *listenPassword, bool remoteEcho=false) |
| | Configure the parameter for the telnet console.
|
| void | processConsoleLine (const char *line) |
| | Callback to handle a line from the console.
|
Static Public Member Functions |
| static void | create () |
| | Initialize the telnet console.
|
| static void | destroy () |
| | Shut down the telnet console.
|
Private Types |
| | PasswordMaxLength = 32 |
| | Maximum length of the telnet and listen passwords.
|
| | PasswordTryOne |
| | Allow three password attempts.
|
| | PasswordTryTwo |
| | PasswordTryThree |
| | DisconnectThisDude |
| | If they've failed all three, disconnect them.
|
| | FullAccessConnected |
| | They presented the telnetPassword, they get full access.
|
| | ReadOnlyConnected |
| | They presented the listenPassword, they get read only access.
|
| enum | { PasswordMaxLength = 32
} |
| enum | State {
PasswordTryOne,
PasswordTryTwo,
PasswordTryThree,
DisconnectThisDude,
FullAccessConnected,
ReadOnlyConnected
} |
| | State of a TelnetClient. More...
|
Private Member Functions |
| | TelnetConsole () |
| | ~TelnetConsole () |
Private Attributes |
| NetSocket | mAcceptSocket |
| S32 | mAcceptPort |
| bool | mRemoteEchoEnabled |
| char | mTelnetPassword [PasswordMaxLength+1] |
| char | mListenPassword [PasswordMaxLength+1] |
| TelnetClient * | mClientList |
Classes |
| struct | TelnetClient |
| | Represents a connection to the telnet console. More...
|
Member Enumeration Documentation
- Enumerator:
-
| PasswordMaxLength |
Maximum length of the telnet and listen passwords. |
State of a TelnetClient.
- Enumerator:
-
| PasswordTryOne |
Allow three password attempts. |
| PasswordTryTwo |
|
| PasswordTryThree |
|
| DisconnectThisDude |
If they've failed all three, disconnect them. |
| FullAccessConnected |
They presented the telnetPassword, they get full access. |
| ReadOnlyConnected |
They presented the listenPassword, they get read only access. |
Constructor & Destructor Documentation
| TelnetConsole::TelnetConsole |
( |
|
) |
[private] |
| TelnetConsole::~TelnetConsole |
( |
|
) |
[private] |
Member Function Documentation
| static void TelnetConsole::create |
( |
|
) |
[static] |
Initialize the telnet console.
| static void TelnetConsole::destroy |
( |
|
) |
[static] |
Shut down the telnet console.
| void TelnetConsole::process |
( |
|
) |
|
Called by the main loop to let the console process commands and connections.
| void TelnetConsole::setTelnetParameters |
( |
S32 |
port, |
|
|
const char * |
telnetPassword, |
|
|
const char * |
listenPassword, |
|
|
bool |
remoteEcho = false | |
|
) |
| | |
Configure the parameter for the telnet console.
- Parameters:
-
| port | Port on which to listen for connections. |
| telnetPassword | Password for full access to the console. |
| listenPassword | Password for read-only access to the console. |
| remoteEcho | Enable/disable echoing input back to the client |
| void TelnetConsole::processConsoleLine |
( |
const char * |
line |
) |
|
Callback to handle a line from the console.
- Note:
- This is used internally by the class; you shouldn't need to call it.
- See also:
- Con::addConsumer()
Member Data Documentation
|