|
CAF 0.17.6
|
Manages writing to a datagram sink. More...
#include <datagram_servant.hpp>
Public Member Functions | |
| datagram_servant (datagram_handle hdl) | |
| virtual void | ack_writes (bool enable)=0 |
| Enables or disables write notifications. | |
| virtual std::vector< char > & | wr_buf (datagram_handle)=0 |
| Returns a new output buffer. | |
| virtual void | enqueue_datagram (datagram_handle, std::vector< char >)=0 |
| Enqueue a buffer to be sent as a datagram. | |
| virtual network::receive_buffer & | rd_buf ()=0 |
| Returns the current input buffer. | |
| virtual void | flush ()=0 |
| Flushes the output buffer, i.e., sends the content of the buffer via the network. | |
| virtual uint16_t | local_port () const =0 |
| Returns the local port of associated socket. | |
| virtual std::vector< datagram_handle > | hdls () const =0 |
| Returns all the handles associated with this servant. | |
| virtual void | add_endpoint (const network::ip_endpoint &ep, datagram_handle hdl)=0 |
| Adds a new remote endpoint identified by the ip_endpoint to the related manager. | |
| virtual void | remove_endpoint (datagram_handle hdl)=0 |
| bool | consume (execution_unit *, datagram_handle hdl, network::receive_buffer &buf) override |
| Called by the underlying I/O device whenever it received data. | |
| void | datagram_sent (execution_unit *, datagram_handle hdl, size_t, std::vector< char > buffer) override |
| Called by the underlying I/O device whenever it sent data. | |
| virtual void | detach_handles ()=0 |
| virtual void | launch ()=0 |
| Public Member Functions inherited from caf::io::broker_servant< network::datagram_manager, datagram_handle, new_datagram_msg > | |
| broker_servant (handle_type x) | |
| handle_type | hdl () const |
| void | halt () |
| void | trigger () |
| void | trigger (size_t num) |
| optional< size_t > | activity_tokens () const |
| Public Member Functions inherited from caf::io::network::datagram_manager | |
| 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. | |
| Public Member Functions inherited from caf::io::network::manager | |
| 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. | |
| Public Member Functions inherited from caf::ref_counted | |
| ref_counted (const ref_counted &) | |
| ref_counted & | operator= (const 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 |
Protected Member Functions | |
| message | detach_message () override |
| Protected Member Functions inherited from caf::io::broker_servant< network::datagram_manager, datagram_handle, new_datagram_msg > | |
| void | detach_from (abstract_broker *ptr) override |
| void | invoke_mailbox_element_impl (execution_unit *ctx, mailbox_element &x) |
| bool | invoke_mailbox_element (execution_unit *ctx) |
| new_datagram_msg & | msg () |
Additional Inherited Members | |
| Public Types inherited from caf::io::broker_servant< network::datagram_manager, datagram_handle, new_datagram_msg > | |
| using | handle_type |
| Protected Attributes inherited from caf::io::broker_servant< network::datagram_manager, datagram_handle, new_datagram_msg > | |
| handle_type | hdl_ |
| mailbox_element_vals< new_datagram_msg > | value_ |
| optional< size_t > | activity_tokens_ |
| Protected Attributes inherited from caf::ref_counted | |
| std::atomic< size_t > | rc_ |
| Related Symbols inherited from caf::ref_counted | |
| void | intrusive_ptr_add_ref (const ref_counted *p) |
| void | intrusive_ptr_release (const ref_counted *p) |
Manages writing to a datagram sink.
|
pure virtual |
Enables or disables write notifications.
Implemented in caf::io::network::datagram_servant_impl.
|
pure virtual |
Adds a new remote endpoint identified by the ip_endpoint to the related manager.
Implemented in caf::io::network::datagram_servant_impl.
|
overridevirtual |
Called by the underlying I/O device whenever it received data.
Implements caf::io::network::datagram_manager.
|
overridevirtual |
Called by the underlying I/O device whenever it sent data.
Implements caf::io::network::datagram_manager.
|
pure virtual |
Enqueue a buffer to be sent as a datagram.
Implemented in caf::io::network::datagram_servant_impl.
|
pure virtual |
Flushes the output buffer, i.e., sends the content of the buffer via the network.
Implemented in caf::io::network::datagram_servant_impl.
|
pure virtual |
Returns all the handles associated with this servant.
Implemented in caf::io::network::datagram_servant_impl.
|
pure virtual |
Returns the local port of associated socket.
Implemented in caf::io::network::datagram_servant_impl.
|
pure virtual |
Returns the current input buffer.
Implemented in caf::io::network::datagram_servant_impl.
|
pure virtual |
Returns a new output buffer.
Implemented in caf::io::network::datagram_servant_impl.