actor-framework
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:
Inheritance graph
[legend]
Collaboration diagram for caf::io::datagram_servant:
Collaboration graph
[legend]

Public Member Functions

 datagram_servant (datagram_handle hdl)
 
virtual void ack_writes (bool enable)=0
 Enables or disables write notifications.
 
virtual byte_bufferwr_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_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. More...
 
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. More...
 
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_
 

Detailed Description

Manages writing to a datagram sink.

Member Function Documentation

◆ add_endpoint()

virtual void caf::io::datagram_servant::add_endpoint ( const network::ip_endpoint ep,
datagram_handle  hdl 
)
pure virtual

Adds a new remote endpoint identified by the ip_endpoint to the related manager.

Implemented in caf::io::network::datagram_servant_impl.

◆ flush()

virtual void caf::io::datagram_servant::flush ( )
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.


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