|
My Project 3.7.9
C++ Distributed Hash Table
|


Public Types | |
| using | OnReceive = std::function<PacketList(PacketList&& packets)> |
Public Member Functions | |
| virtual int | sendTo (const SockAddr &dest, const uint8_t *data, size_t size, bool replied)=0 |
| void | setOnReceive (OnReceive &&cb) |
| virtual bool | hasIPv4 () const =0 |
| virtual bool | hasIPv6 () const =0 |
| SockAddr | getBound (sa_family_t family=AF_UNSPEC) const |
| in_port_t | getPort (sa_family_t family=AF_UNSPEC) const |
| virtual const SockAddr & | getBoundRef (sa_family_t family=AF_UNSPEC) const =0 |
| virtual std::vector< SockAddr > | resolve (const std::string &host, const std::string &service={}) |
| virtual void | stop ()=0 |
Protected Member Functions | |
| PacketList | getNewPacket () |
| void | onReceived (PacketList &&packets) |
Protected Attributes | |
| std::mutex | lock |
Definition at line 48 of file network_utils.h.
| using dht::net::DatagramSocket::OnReceive = std::function<PacketList(PacketList&& packets)> |
A function that takes a list of new received packets and optionally returns consumed packets for recycling.
Definition at line 54 of file network_utils.h.
|
inlinevirtual |
Definition at line 55 of file network_utils.h.
|
inline |
Definition at line 68 of file network_utils.h.
|
inlineprotected |
Definition at line 90 of file network_utils.h.
|
inline |
Definition at line 73 of file network_utils.h.
|
inlineprotected |
Definition at line 103 of file network_utils.h.
|
inlinevirtual |
Virtual resolver mothod allows to implement custom resolver
Definition at line 82 of file network_utils.h.
|
inline |
Definition at line 59 of file network_utils.h.
|
mutableprotected |
Definition at line 114 of file network_utils.h.