#include <TelnetServer.hpp>


Public Member Functions | |
| TelnetServer ()=default | |
| Constructor for server. | |
| TelnetServer (const TelnetServer &)=delete | |
| Copy constructor. | |
| TelnetServer (TelnetServer &&)=delete | |
| Move constructor. | |
| TelnetServer & | operator= (TelnetServer)=delete |
| Copy assignment operator. | |
| TelnetServer & | operator= (TelnetServer &&)=delete |
| Move assignment operator. | |
| ~TelnetServer () | |
| Destructor for server. | |
| bool | initialise (unsigned long listenPort, const std::shared_ptr< std::atomic_flag > &checkFlag, std::string promptString="", const std::shared_ptr< prometheus::Registry > ®=nullptr, const std::string &prependName="") |
| void | shutdown () |
| Closes the Telnet Server. | |
| void | connectedCallback (FPTR_ConnectedCallback func) |
| FPTR_ConnectedCallback | connectedCallback () const |
| void | newLineCallback (FPTR_NewLineCallback func) |
| FPTR_NewLineCallback | newLineCallBack () const |
| void | tabCallback (FPTR_TabCallback func) |
| FPTR_TabCallback | tabCallback () const |
| const VEC_SP_TelnetSession & | sessions () const |
| bool | interactivePrompt () const |
| void | promptString (const std::string_view &prompt) |
| const std::string & | promptString () const |
Private Member Functions | |
| bool | acceptConnection () |
| void | threadFunc (const std::stop_token &stopToken) noexcept |
| void | update () |
| Process new connections and messages. | |
Private Attributes | |
| FPTR_ConnectedCallback | m_connectedCallback |
| FPTR_NewLineCallback | m_newlineCallback |
| FPTR_TabCallback | m_tabCallback |
| unsigned long | m_listenPort {} |
| Socket | m_listenSocket {-1} |
| VEC_SP_TelnetSession | m_sessions |
| bool | m_initialised {false} |
| std::string | m_promptString |
| std::unique_ptr< TelnetStats > | m_stats |
| std::shared_ptr< std::atomic_flag > | m_checkFlag |
| std::unique_ptr< std::jthread > | m_serverThread |
Definition at line 132 of file TelnetServer.hpp.
|
default |
Constructor for server.

|
delete |
Copy constructor.

|
delete |
Move constructor.

| TelnetServer::~TelnetServer | ( | ) |
Destructor for server.
Definition at line 546 of file TelnetServer.cpp.

|
private |
Definition at line 636 of file TelnetServer.cpp.

|
inline |
Definition at line 169 of file TelnetServer.hpp.
|
inline |
Definition at line 168 of file TelnetServer.hpp.
| bool TelnetServer::initialise | ( | unsigned long | listenPort, |
| const std::shared_ptr< std::atomic_flag > & | checkFlag, | ||
| std::string | promptString = "", | ||
| const std::shared_ptr< prometheus::Registry > & | reg = nullptr, | ||
| const std::string & | prependName = "" ) |
Initializes a new Telnet server
| [in] | listenPort | Port to listen |
| [in] | promptString | Prompt string for connected users |
| [in] | reg | Prometheus registry for stats |
| [in] | prependName | Prefix for Prometheus stats |
Definition at line 566 of file TelnetServer.cpp.

|
inline |
Definition at line 179 of file TelnetServer.hpp.
|
inline |
Definition at line 172 of file TelnetServer.hpp.
|
inline |
Definition at line 171 of file TelnetServer.hpp.
|
delete |
Move assignment operator.

|
delete |
Copy assignment operator.

|
inline |
Definition at line 181 of file TelnetServer.hpp.
|
inline |
Definition at line 180 of file TelnetServer.hpp.

|
inline |
Definition at line 177 of file TelnetServer.hpp.
| void TelnetServer::shutdown | ( | ) |
Closes the Telnet Server.
Definition at line 747 of file TelnetServer.cpp.

|
inline |
Definition at line 175 of file TelnetServer.hpp.
|
inline |
Definition at line 174 of file TelnetServer.hpp.
|
privatenoexcept |
Definition at line 660 of file TelnetServer.cpp.


|
private |
Process new connections and messages.
Definition at line 682 of file TelnetServer.cpp.


|
private |
Runtime check flag
Definition at line 207 of file TelnetServer.hpp.
|
private |
Definition at line 185 of file TelnetServer.hpp.
|
private |
Definition at line 200 of file TelnetServer.hpp.
|
private |
Definition at line 197 of file TelnetServer.hpp.
|
private |
Definition at line 198 of file TelnetServer.hpp.
|
private |
Definition at line 187 of file TelnetServer.hpp.
|
private |
Definition at line 202 of file TelnetServer.hpp.
|
private |
Thread handler
Definition at line 208 of file TelnetServer.hpp.
|
private |
Definition at line 199 of file TelnetServer.hpp.
|
private |
Definition at line 205 of file TelnetServer.hpp.
|
private |
Definition at line 189 of file TelnetServer.hpp.