|
| | Arp ()=delete |
| | create the Arp instance.
|
| |
| | Arp (const std::string &interface, NeighborManager *neighbors=nullptr) |
| | create the Arp instance.
|
| |
| | Arp (const Arp &other)=delete |
| | create instance by copy.
|
| |
| | Arp (Arp &&other)=delete |
| | create instance by move.
|
| |
| Arp & | operator= (const Arp &other)=delete |
| | assign instance by copy.
|
| |
| Arp & | operator= (Arp &&other)=delete |
| | assign instance by move.
|
| |
| | ~Arp ()=default |
| | destroy the Arp instance.
|
| |
| template<typename Rep , typename Period > |
| MacAddress | get (const IpAddress &ip, std::chrono::duration< Rep, Period > timeout) |
| | get the MAC address for the given IP address using netlink neighbor cache or ARP request.
|
| |
| MacAddress | get (const IpAddress &ip) |
| | get the MAC address for the given IP address using ARP cache or ARP request.
|
| |
| template<typename Rep , typename Period > |
| MacAddress | request (const IpAddress &ip, std::chrono::duration< Rep, Period > timeout) |
| | get the MAC address for the given IP address using ARP request.
|
| |
| MacAddress | request (const IpAddress &ip) |
| | get the MAC address for the given IP address using ARP request.
|
| |
| int | add (const MacAddress &mac, const IpAddress &ip) |
| | add entry the MAC address of the given IP address to ARP cache.
|
| |
| int | remove (const IpAddress &ip) |
| | remove the MAC address of the given IP address from ARP cache.
|
| |
| MacAddress | cache (const IpAddress &ip) |
| | get the MAC address for the given IP address using ARP cache.
|
| |
| | BasicSocket () |
| | default constructor.
|
| |
| | BasicSocket (Mode mode) |
| | create socket instance specifying the mode.
|
| |
| | BasicSocket (const BasicSocket &other)=delete |
| | copy constructor.
|
| |
| BasicSocket & | operator= (const BasicSocket &other)=delete |
| | copy assignment operator.
|
| |
| | BasicSocket (BasicSocket &&other) |
| | move constructor.
|
| |
| BasicSocket & | operator= (BasicSocket &&other) |
| | move assignment operator.
|
| |
| virtual | ~BasicSocket () |
| | destroy the socket instance.
|
| |
| virtual int | open (const Protocol &protocol=Protocol()) noexcept |
| | open socket using the given protocol.
|
| |
| virtual void | close () noexcept |
| | close the socket.
|
| |
| virtual int | bind (const Endpoint &endpoint) noexcept |
| | assigns the specified endpoint to the socket.
|
| |
| virtual int | canRead () const noexcept |
| | get the number of readable bytes.
|
| |
| virtual bool | waitReadyRead (int timeout=0) const noexcept |
| | block until new data is available for reading.
|
| |
| virtual int | read (char *data, unsigned long maxSize) noexcept |
| | read data.
|
| |
| virtual bool | waitReadyWrite (int timeout=0) const noexcept |
| | block until at least one byte can be written.
|
| |
| virtual int | write (const char *data, unsigned long maxSize) noexcept |
| | write data.
|
| |
| void | setMode (Mode mode) noexcept |
| | set the socket to the non-blocking or blocking mode.
|
| |
| virtual int | setOption (Option option, int value) noexcept |
| | set the given option to the given value.
|
| |
| Endpoint | localEndpoint () const |
| | determine the local endpoint associated with this socket.
|
| |
| bool | opened () const noexcept |
| | check if the socket is opened.
|
| |
| virtual bool | encrypted () const noexcept |
| | check if the socket is secure.
|
| |
| int | family () const noexcept |
| | get socket address family.
|
| |
| int | type () const noexcept |
| | get the protocol communication semantic.
|
| |
| int | protocol () const noexcept |
| | get socket protocol.
|
| |
| int | handle () const noexcept |
| | get socket native handle.
|
| |
Public Member Functions inherited from join::EventHandler |
| | EventHandler ()=default |
| | create instance.
|
| |
| | EventHandler (const EventHandler &other)=default |
| | copy constructor.
|
| |
| EventHandler & | operator= (const EventHandler &other)=default |
| | copy assignment operator.
|
| |
| | EventHandler (EventHandler &&other)=default |
| | move constructor.
|
| |
| EventHandler & | operator= (EventHandler &&other)=default |
| | move assignment operator.
|
| |
| virtual | ~EventHandler ()=default |
| | destroy instance.
|
| |
|
| template<typename Rep , typename Period > |
| static MacAddress | get (const std::string &interface, const IpAddress &ip, std::chrono::duration< Rep, Period > timeout) |
| | discover the MAC address for the given internet layer address.
|
| |
| static MacAddress | get (const std::string &interface, const IpAddress &ip) |
| | discover the MAC address for the given internet layer address.
|
| |
| template<typename Rep , typename Period > |
| static MacAddress | request (const std::string &interface, const IpAddress &ip, std::chrono::duration< Rep, Period > timeout) |
| | get the MAC address for the given IP address using ARP request.
|
| |
| static MacAddress | request (const std::string &interface, const IpAddress &ip) |
| | get the MAC address for the given IP address using ARP request.
|
| |
| static int | add (const std::string &interface, const MacAddress &mac, const IpAddress &ip) |
| | add entry the MAC address of the given IP address to ARP cache.
|
| |
| static int | remove (const std::string &interface, const IpAddress &ip) |
| | remove the MAC address of the given IP address from ARP cache.
|
| |
| static MacAddress | cache (const std::string &interface, const IpAddress &ip) |
| | get the MAC address for the given IP address using ARP cache.
|
| |
| static uint16_t | checksum (const uint16_t *data, size_t len, uint16_t current=0) |
| | get standard 1s complement checksum.
|
| |
|
| enum | Mode { Blocking
, NonBlocking
} |
| | socket modes. More...
|
| |
| enum | Option {
NoDelay
, KeepAlive
, KeepIdle
, KeepIntvl
,
KeepCount
, SndBuffer
, RcvBuffer
, TimeStamp
,
ReuseAddr
, ReusePort
, Broadcast
, Ttl
,
MulticastLoop
, MulticastTtl
, PathMtuDiscover
, RcvError
,
AuxData
} |
| | socket options. More...
|
| |
| enum | State {
Connecting
, Connected
, Disconnecting
, Disconnected
,
Closed
} |
| | socket states. More...
|
| |
| using | Ptr = std::unique_ptr<BasicSocket<Protocol>> |
| |
| using | Endpoint = typename Protocol::Endpoint |
| |
| int | wait (bool wantRead, bool wantWrite, int timeout) const noexcept |
| | wait for the socket handle to become ready.
|
| |
Protected Member Functions inherited from join::EventHandler |
| virtual void | onClose (int fd) |
| | method called when handle is closed.
|
| |
| virtual void | onError (int fd) |
| | method called when an error occurred on handle.
|
| |
| State | _state = State::Closed |
| | socket state.
|
| |
| Mode | _mode = Mode::NonBlocking |
| | socket mode.
|
| |
| int | _handle = -1 |
| | socket handle.
|
| |
| Protocol | _protocol |
| | protocol.
|
| |