|
| socket_interface (socket_interface const &)=delete |
|
socket_interface & | operator= (socket_interface const &)=delete |
|
virtual int | read (void *buffer, unsigned int size, int &error)=0 |
|
virtual int | write (void const *buffer, unsigned int size, int &error)=0 |
|
template<typename T , std::enable_if_t< std::is_signed_v< T >, int > = 0> |
int | read (void *buffer, T size, int &error) |
|
template<typename T , std::enable_if_t< std::is_unsigned_v< T > &&(sizeof(T) > sizeof(unsigned int)), int > = 0> |
int | read (void *buffer, T size, int &error) |
|
template<typename T , std::enable_if_t< std::is_signed_v< T >, int > = 0> |
int | write (void const *buffer, T size, int &error) |
|
template<typename T , std::enable_if_t< std::is_unsigned_v< T > &&(sizeof(T) > sizeof(unsigned int)), int > = 0> |
int | write (void const *buffer, T size, int &error) |
|
virtual void | set_event_handler (event_handler *pEvtHandler, fz::socket_event_flag retrigger_block=fz::socket_event_flag{})=0 |
|
virtual native_string | peer_host () const =0 |
|
virtual int | peer_port (int &error) const =0 |
|
virtual int | connect (native_string const &host, unsigned int port, address_type family=address_type::unknown)=0 |
|
virtual fz::socket_state | get_state () const =0 |
|
virtual int | shutdown ()=0 |
| Signals peers that we want to close the connections. More...
|
|
virtual int | shutdown_read ()=0 |
|
socket_event_source * | root () const |
| Gets the root source. More...
|
|
Interface for sockets.
Can be used for layers, see fz::socket for the expected semantics.
Signals peers that we want to close the connections.
Only disallows further sends, does not affect reading from the socket.
Returns 0 on success, an error code otherwise. If it returns EGAIN, shutdown is not yet complete. Call shutdown again after the next write event.
Implemented in ascii_layer, compound_rate_limited_layer, socket, socket_layer, and tls_layer.