3#include <StormByte/network/endpoint.hxx>
4#include <StormByte/network/packet.hxx>
23 Client(
const Connection::Protocol& protocol, std::shared_ptr<Connection::Handler> handler, std::shared_ptr<Logger> logger,
const PacketInstanceFunction& pf)
noexcept;
63 StormByte::Expected<
void,
ConnectionError> Connect(const std::
string& hostname, const
unsigned short& port) noexcept;
68 void Disconnect() noexcept;
The class representing a client.
Definition client.hxx:15
Client(const Connection::Protocol &protocol, std::shared_ptr< Connection::Handler > handler, std::shared_ptr< Logger > logger, const PacketInstanceFunction &pf) noexcept
The constructor of the Client class.
Client(const Client &other)=delete
The copy constructor of the Client class.
virtual ~Client() noexcept override
The destructor of the Client class.
Client(Client &&other) noexcept=default
The move constructor of the Client class.
The class representing an error in the connection.
Definition exception.hxx:27
Represents a network endpoint, serving as a base class for both clients and servers.
Definition endpoint.hxx:17
The class representing a packet. Explicitelly instantiate this class to get packets identified by the...
Definition packet.hxx:18
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:37
std::function< std::shared_ptr< Packet >(const unsigned short &)> PacketInstanceFunction
The packet instance function type.
Definition typedefs.hxx:38