A datagram manager provides callbacks for outgoing datagrams as well as for error handling.
More...
#include <datagram_manager.hpp>
|
virtual bool | consume (scheduler *, datagram_handle hdl, receive_buffer &buf)=0 |
| Called by the underlying I/O device whenever it received data.
|
|
virtual void | datagram_sent (scheduler *, datagram_handle hdl, size_t, byte_buffer buffer)=0 |
| Called by the underlying I/O device whenever it sent data.
|
|
virtual bool | new_endpoint (receive_buffer &buf)=0 |
| Called by the underlying I/O device to indicate that a new remote endpoint has been detected, passing in the received datagram.
|
|
virtual uint16_t | port (datagram_handle) const =0 |
| Get the port of the underlying I/O device.
|
|
virtual std::string | addr (datagram_handle) const =0 |
| Get the remote address of the underlying I/O device.
|
|
void | set_parent (abstract_broker *ptr) |
| Sets the parent for this manager.
|
|
abstract_broker * | parent () |
| Returns the parent broker of this manager.
|
|
bool | detached () const |
| Returns true if this manager has a parent, false otherwise.
|
|
virtual void | detach_from (abstract_broker *ptr)=0 |
| Detach this manager from its parent and invoke detach_message() / if invoke_detach_message == true`.
|
|
| atomic_ref_counted (const atomic_ref_counted &) |
|
atomic_ref_counted & | operator= (const atomic_ref_counted &) |
|
void | ref () const noexcept |
| Increases reference count by one.
|
|
void | deref () const noexcept |
| Decreases reference count by one and calls request_deletion when it drops to zero.
|
|
bool | unique () const noexcept |
| Queries whether there is exactly one reference.
|
|
size_t | get_reference_count () const noexcept |
| Queries the current reference count for this object.
|
|
A datagram manager provides callbacks for outgoing datagrams as well as for error handling.
◆ consume()
Called by the underlying I/O device whenever it received data.
- Returns
true
if the manager accepts further reads, otherwise false
.
◆ new_endpoint()
virtual bool caf::io::network::datagram_manager::new_endpoint |
( |
receive_buffer & | buf | ) |
|
|
pure virtual |
Called by the underlying I/O device to indicate that a new remote endpoint has been detected, passing in the received datagram.
- Returns
true
if the manager accepts further endpoints, otherwise false
.
The documentation for this class was generated from the following files:
- libcaf_io/caf/io/network/datagram_manager.hpp
- libcaf_io/caf/io/network/datagram_manager.cpp