30#ifndef WIZARD_ENGINE_SOCKET_HPP
31#define WIZARD_ENGINE_SOCKET_HPP
45template <
typename incoming,
typename outgoing>
class socket {
46 static_assert(
sizeof(incoming) <= std::numeric_limits<int32_t>::max() &&
47 sizeof(outgoing) <= std::numeric_limits<int32_t>::max());
59 [[nodiscard]]
virtual ipv4 const&
ipv4()
const = 0;
70 virtual void receive(incoming& buffer) = 0;
78 virtual bool send(outgoing
const& buffer) = 0;
virtual bool send(outgoing const &buffer)=0
Sends data to the server.
virtual void receive(incoming &buffer)=0
Receives data from the server.
virtual ~socket()=default
virtual ipv4 const & ipv4() const =0
Gets the wze::ipv4 address of the server.
Export header of the Wizard Engine.
IPaddress ipv4
IPv4 address.