Generic socket. More...
#include <socket.hpp>
Public Member Functions | |
virtual | ~socket ()=default |
virtual ipv4 const & | ipv4 () const =0 |
Gets the wze::ipv4 address of the server. | |
virtual void | receive (incoming &buffer)=0 |
Receives data from the server. | |
virtual bool | send (outgoing const &buffer)=0 |
Sends data to the server. | |
Generic socket.
incoming | Type of the incoming data. |
outgoing | Type of the outgoing data. |
Definition at line 45 of file socket.hpp.
|
virtualdefault |
Default virtual destructor.
|
nodiscardpure virtual |
|
pure virtual |
Receives data from the server.
buffer | Data buffer. |
true | Received appropriate data. |
false | Received invalid data. |
wze::exception | Data cannot be received properly. |
|
pure virtual |
Sends data to the server.
buffer | Data buffer. |
wze::exception | Data cannot be sent properly. |