TelnetConsole

Engine/source/console/telnetConsole.h

Telnet admin console.

More...

Classes:

class

Represents a connection to the telnet console.

Private Types

enum
_Anonymous_ {  PasswordMaxLength = 32
}
enum
State {
  PasswordTryOne 
  PasswordTryTwo 
  PasswordTryThree 
  DisconnectThisDude 
  FullAccessConnected 
  ReadOnlyConnected 
}

State of a TelnetClient.

Private Attributes

TelnetClient *
char
mListenPassword [PasswordMaxLength+1]
char
mTelnetPassword [PasswordMaxLength+1]

Private Functions

Public Static Functions

Initialize the telnet console.

Shut down the telnet console.

Public Functions

Called by the main loop to let the console process commands and connections.

Callback to handle a line from the console.

setTelnetParameters(S32 port, const char * telnetPassword, const char * listenPassword, bool remoteEcho)

Configure the parameter for the telnet console.

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.

Private Types

@66

Enumerator

PasswordMaxLength = 32

Maximum length of the telnet and listen passwords.

State

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.

State of a TelnetClient.

Private Attributes

S32 mAcceptPort 
NetSocket mAcceptSocket 
TelnetClient * mClientList 
char mListenPassword [PasswordMaxLength+1]
bool mRemoteEchoEnabled 
char mTelnetPassword [PasswordMaxLength+1]

Private Functions

TelnetConsole()

~TelnetConsole()

Public Static Functions

create()

Initialize the telnet console.

destroy()

Shut down the telnet console.

Public Functions

process()

Called by the main loop to let the console process commands and connections.

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.

setTelnetParameters(S32 port, const char * telnetPassword, const char * listenPassword, bool remoteEcho)

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