CAF  0.17.3
Public Member Functions | Protected Member Functions | List of all members
caf::io::datagram_servant Class Referenceabstract

Manages writing to a datagram sink. More...

#include <datagram_servant.hpp>

Inheritance diagram for caf::io::datagram_servant:
caf::io::broker_servant< Base, Handle, SysMsgType > caf::io::network::datagram_servant_impl

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_bufferrd_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_handlehdls () 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
 
void datagram_sent (execution_unit *, datagram_handle hdl, size_t, std::vector< char > 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)
 
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 (execution_unit *ctx, mailbox_element &x)
 
bool invoke_mailbox_element (execution_unit *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_vals< SysMsgType > value_
 
optional< size_t > activity_tokens_
 

Detailed Description

Manages writing to a datagram sink.


The documentation for this class was generated from the following file: