#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 364 of file TelnetServer.cpp.
bool TelnetSession::checkTimeout | ( | ) | const |
Checks the connection timeout.
Definition at line 195 of file TelnetServer.cpp.
void TelnetSession::closeClient | ( | ) |
Finish the session.
Definition at line 181 of file TelnetServer.cpp.
|
private |
Definition at line 206 of file TelnetServer.cpp.
|
private |
Definition at line 143 of file TelnetServer.cpp.
|
staticprivate |
Definition at line 428 of file TelnetServer.cpp.
|
private |
Definition at line 109 of file TelnetServer.cpp.
|
protected |
Initialise session.
Definition at line 221 of file TelnetServer.cpp.
void TelnetSession::markTimeout | ( | ) |
Marks timeout to close session.
Definition at line 201 of file TelnetServer.cpp.
|
staticprivate |
Definition at line 300 of file TelnetServer.cpp.
|
private |
Definition at line 378 of file TelnetServer.cpp.
|
private |
Definition at line 330 of file TelnetServer.cpp.
void TelnetSession::sendLine | ( | std::string | data | ) |
Send a line of data to the Telnet Server.
Definition at line 161 of file TelnetServer.cpp.
|
private |
Definition at line 122 of file TelnetServer.cpp.
|
staticprivate |
Definition at line 282 of file TelnetServer.cpp.
|
staticprivate |
Definition at line 265 of file TelnetServer.cpp.
|
protected |
Called every frame/loop by the Terminal Server.
Definition at line 447 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.