C++ Actor Framework 1.0.0
|
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 byte_buffer & | wr_buf (datagram_handle)=0 |
Returns a new output buffer. | |
virtual void | enqueue_datagram (datagram_handle, byte_buffer)=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 (scheduler *, datagram_handle hdl, network::receive_buffer &buf) override |
void | datagram_sent (scheduler *, datagram_handle hdl, size_t, byte_buffer buffer) override |
virtual void | detach_handles ()=0 |
virtual void | launch ()=0 |
Public Member Functions inherited from caf::io::broker_servant< Base, Handle, SysMsgType > | |
broker_servant (handle_type x) | |
handle_type | hdl () const |
void | halt () |
void | trigger () |
void | trigger (size_t num) |
std::optional< size_t > | activity_tokens () const |
Protected Member Functions | |
message | detach_message () override |
Protected Member Functions inherited from caf::io::broker_servant< Base, Handle, SysMsgType > | |
void | detach_from (abstract_broker *ptr) override |
void | invoke_mailbox_element_impl (scheduler *ctx, mailbox_element &x) |
bool | invoke_mailbox_element (scheduler *ctx) |
SysMsgType & | msg () |
Additional Inherited Members | |
Public Types inherited from caf::io::broker_servant< Base, Handle, SysMsgType > | |
using | handle_type = Handle |
Protected Attributes inherited from caf::io::broker_servant< Base, Handle, SysMsgType > | |
handle_type | hdl_ |
mailbox_element | value_ |
std::optional< size_t > | activity_tokens_ |
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.
|
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.