3#include <StormByte/buffer/pipeline.hxx>
4#include <StormByte/network/connection/handler.hxx>
5#include <StormByte/network/packet.hxx>
6#include <StormByte/network/typedefs.hxx>
7#include <StormByte/logger.hxx>
28 EndPoint(
const Connection::Protocol& protocol, std::shared_ptr<Connection::Handler> handler, std::shared_ptr<Logger> logger)
noexcept;
61 virtual
ExpectedVoid Connect(const std::
string& host, const
unsigned short& port) noexcept = 0;
66 virtual
void Disconnect() noexcept;
83 std::shared_ptr<Logger> m_logger;
85 Socket::Socket* m_socket;
86 Buffer::Pipeline m_input_pipeline, m_output_pipeline;
The class representing a client.
Definition client.hxx:15
Represents a network endpoint, serving as a base class for both clients and servers.
Definition endpoint.hxx:20
virtual ~EndPoint() noexcept
Virtual destructor for proper cleanup in derived classes.
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.
Represents a network packet.
Definition packet.hxx:21
The namespace containing connection items.
Contains all the network-related classes and utilities.
Definition client.hxx:10
StormByte::Expected< std::shared_ptr< Packet >, PacketError > ExpectedPacket
The expected packet type.
Definition typedefs.hxx:38
StormByte::Expected< void, ConnectionError > ExpectedVoid
The expected void type.
Definition typedefs.hxx:32