#include <TelnetServer.hpp>
Public Member Functions | |
TelnetSession (Socket ClientSocket, std::shared_ptr< TelnetServer > tServer) | |
Constructor for session. | |
void | sendLine (std::string data) |
Send a line of data to the Telnet Server. | |
void | closeClient () |
Finish the session. | |
bool | checkTimeout () const |
Checks the connection timeout. | |
void | markTimeout () |
Marks timeout to close session. | |
Protected Member Functions | |
void | initialise () |
Initialise session. | |
void | update () |
Called every frame/loop by the Terminal Server. | |
Private Member Functions | |
std::string | getPeerIP () const |
void | sendPromptAndBuffer () |
void | eraseLine () |
void | echoBack (const char *buffer, unsigned long length) |
bool | processTab (std::string &buffer) |
void | addToHistory (const std::string &line) |
bool | processCommandHistory (std::string &buffer) |
Static Private Member Functions | |
static void | stripNVT (std::string &buffer) |
static void | stripEscapeCharacters (std::string &buffer) |
static bool | processBackspace (std::string &buffer) |
static std::vector< std::string > | getCompleteLines (std::string &buffer) |
Private Attributes | |
TelnetSessionStats | stats |
Statistics variables. | |
std::chrono::system_clock::time_point | lastSeenTime |
Socket | m_socket |
std::shared_ptr< TelnetServer > | m_telnetServer |
std::string | m_buffer |
std::list< std::string > | m_history |
std::list< std::string >::iterator | m_historyCursor |
friend | TelnetServer |
Session class for manage connections
Definition at line 56 of file TelnetServer.hpp.
|
inline |
Constructor for session.
Definition at line 59 of file TelnetServer.hpp.
|
private |
Definition at line 362 of file TelnetServer.cpp.
bool TelnetSession::checkTimeout | ( | ) | const |
Checks the connection timeout.
Definition at line 194 of file TelnetServer.cpp.
void TelnetSession::closeClient | ( | ) |
Finish the session.
Definition at line 180 of file TelnetServer.cpp.
|
private |
Definition at line 205 of file TelnetServer.cpp.
|
private |
Definition at line 142 of file TelnetServer.cpp.
|
staticprivate |
Definition at line 426 of file TelnetServer.cpp.
|
private |
Definition at line 108 of file TelnetServer.cpp.
|
protected |
Initialise session.
Definition at line 220 of file TelnetServer.cpp.
void TelnetSession::markTimeout | ( | ) |
Marks timeout to close session.
Definition at line 200 of file TelnetServer.cpp.
|
staticprivate |
Definition at line 299 of file TelnetServer.cpp.
|
private |
Definition at line 376 of file TelnetServer.cpp.
|
private |
Definition at line 329 of file TelnetServer.cpp.
void TelnetSession::sendLine | ( | std::string | data | ) |
Send a line of data to the Telnet Server.
Definition at line 160 of file TelnetServer.cpp.
|
private |
Definition at line 121 of file TelnetServer.cpp.
|
staticprivate |
Definition at line 281 of file TelnetServer.cpp.
|
staticprivate |
Definition at line 264 of file TelnetServer.cpp.
|
protected |
Called every frame/loop by the Terminal Server.
Definition at line 445 of file TelnetServer.cpp.
|
private |
Definition at line 108 of file TelnetServer.hpp.
|
private |
Definition at line 114 of file TelnetServer.hpp.
|
private |
Definition at line 116 of file TelnetServer.hpp.
|
private |
Definition at line 118 of file TelnetServer.hpp.
|
private |
Definition at line 110 of file TelnetServer.hpp.
|
private |
Definition at line 112 of file TelnetServer.hpp.
|
private |
Statistics variables.
Definition at line 106 of file TelnetServer.hpp.
|
private |
Definition at line 120 of file TelnetServer.hpp.