43#include <StormByte/buffer/pipeline.hxx>
44#include <StormByte/logger/threaded_log.hxx>
128 virtual
bool Connect(const
Connection::Protocol& protocol,
std::string_view address, const
unsigned short& port) = 0;
STORMBYTE_DECLARE_MAYBE_SAFE(StormByte::Buffer::Bridge)
Abstract application client.
Definition client.hxx:124
Caller-owned callback that builds a packet from opcode and payload.
Definition typedefs.hxx:143
Endpoint(Endpoint &&other) noexcept
Move constructor.
virtual bool Connect(const Connection::Protocol &protocol, std::string_view address, const unsigned short &port)=0
Connect or listen (meaning depends on the derived class).
StormByte::Safe::Shared< Connection::Client > CreateConnection(StormByte::Safe::Shared< Socket::Client > socket) noexcept
Wrap a socket client with initially empty input/output pipelines.
virtual Connection::Status Status() const noexcept=0
Current connection/listen status.
Endpoint(DeserializePacketFunction deserialize_packet_function, StormByte::Safe::Shared< Logger::Log > logger) noexcept
Construct with a packet factory and a logger.
Endpoint(const Endpoint &other)=delete
Copy constructor (deleted).
PacketPointer Send(StormByte::Safe::Shared< Connection::Client > client_connection, const Transport::Packet &packet) noexcept
Send packet and wait for a response frame.
virtual void Disconnect() noexcept=0
Tear down the endpoint.
bool Reply(StormByte::Safe::Shared< Connection::Client > client_connection, const Transport::Packet &packet) noexcept
Send packet without waiting for a reply.
StormByte::Safe::Shared< Logger::Log > m_logger
Shared diagnostic logger for this endpoint.
Definition endpoint.hxx:150
virtual ~Endpoint() noexcept
Destructor.
DeserializePacketFunction m_deserialize_packet_function
Packet factory used to deserialize received wire data.
Definition endpoint.hxx:145
Private native transport implementation.
Network module of the StormByte suite.
StormByte::Safe::Shared< Transport::Packet > PacketPointer
Base-heap shared packet pointer.
Definition typedefs.hxx:132
Root namespace of the StormByte suite.
#define STORMBYTE_NETWORK_PUBLIC
Definition visibility.h:51