|
| Server (Connection::Protocol protocol, std::shared_ptr< Connection::Handler > handler, std::shared_ptr< Logger > logger) noexcept |
| Constructor.
|
|
| Server (const Server &other)=delete |
| Copy constructor (deleted).
|
|
| Server (Server &&other) noexcept=default |
| Move constructor.
|
|
virtual | ~Server () noexcept override |
| Destructor.
|
|
Server & | operator= (const Server &other)=delete |
| Copy assignment operator (deleted).
|
|
Server & | operator= (Server &&other) noexcept=default |
| Move assignment operator.
|
|
virtual ExpectedVoid | Connect (const std::string &host, const unsigned short &port) noexcept override |
| Starts the server.
|
|
virtual void | Disconnect () noexcept override |
| Stops a running server.
|
|
| EndPoint (const Connection::Protocol &protocol, std::shared_ptr< Connection::Handler > handler, std::shared_ptr< Logger > logger) noexcept |
| Constructs an EndPoint with the specified protocol, handler, and logger.
|
|
| EndPoint (const EndPoint &other)=delete |
| Deleted copy constructor to prevent copying.
|
|
| EndPoint (EndPoint &&other) noexcept=default |
| Defaulted move constructor.
|
|
virtual | ~EndPoint () noexcept |
| Virtual destructor for proper cleanup in derived classes.
|
|
EndPoint & | operator= (const EndPoint &other)=delete |
| Deleted copy assignment operator to prevent copying.
|
|
EndPoint & | operator= (EndPoint &&other) noexcept=default |
| Defaulted move assignment operator.
|
|
const Connection::Protocol & | Protocol () const noexcept |
| Retrieves the protocol used by the endpoint.
|
|
Connection::Status | Status () const noexcept |
| Retrieves the current connection status of the endpoint.
|
|
|
Socket::Client & | AddClient (Socket::Client &&client) noexcept |
| The function to add a client to client's vector for store and ownership handling.
|
|
void | RemoveClient (Socket::Client &client) noexcept |
| The function to remove a client from client's vector.
|
|
void | RemoveClientAsync (Socket::Client &client) noexcept |
| The function to remove a client from client's vector in async way.
|
|
void | DisconnectClient (Socket::Client &client) noexcept |
| The function to disconnect a client (but not remove from vector).
|
|
virtual Expected< void, PacketError > | ProcessClientPacket (Socket::Client &client, const Packet &packet) noexcept=0 |
| The function to process a client packet and returns a reply.
|
|
virtual ExpectedVoid | Handshake (Socket::Client &client) noexcept |
| Sets up the connection handler for the endpoint.
|
|
virtual ExpectedVoid | Authenticate (Socket::Client &client) noexcept |
| Authenticates the client connection.
|
|
ExpectedPacket | Receive (Socket::Client &client) noexcept |
| Receives packet from the client processing pipeline before constructing packet.
|
|
ExpectedPacket | RawReceive (Socket::Client &client) noexcept |
| Receives packet from the client without processing pipeline before constructing packet.
|
|
ExpectedVoid | Send (Socket::Client &client, const Packet &packet) noexcept |
| Sends a packet to the client processing pipeline before sending packet.
|
|
ExpectedVoid | RawSend (Socket::Client &client, const Packet &packet) noexcept |
| Sends a packet to the client without processing pipeline before sending packet.
|
|
|
Connection::Protocol | m_protocol |
| The protocol used by the endpoint (e.g., IPv4, IPv6).
|
|
std::shared_ptr< Connection::Handler > | m_handler |
| Shared pointer to the connection handler.
|
|
std::shared_ptr< Logger > | m_logger |
| Shared pointer to the logger instance.
|
|
std::atomic< Connection::Status > | m_status |
| The current connection status of the endpoint.
|
|
Socket::Socket * | m_socket |
| Unique pointer to the socket instance.
|
|
Buffer::Pipeline | m_input_pipeline |
|
Buffer::Pipeline | m_output_pipeline |
| The input/output pipeline for processing data.
|
|