C++ Actor Framework 1.0.0
Loading...
Searching...
No Matches
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 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.
 
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 (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

◆ ack_writes()

virtual void caf::io::datagram_servant::ack_writes ( bool enable)
pure virtual

Enables or disables write notifications.

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

◆ 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.

◆ enqueue_datagram()

virtual void caf::io::datagram_servant::enqueue_datagram ( datagram_handle ,
byte_buffer  )
pure virtual

Enqueue a buffer to be sent as a datagram.

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.

◆ hdls()

virtual std::vector< datagram_handle > caf::io::datagram_servant::hdls ( ) const
pure virtual

Returns all the handles associated with this servant.

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

◆ local_port()

virtual uint16_t caf::io::datagram_servant::local_port ( ) const
pure virtual

Returns the local port of associated socket.

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

◆ rd_buf()

virtual network::receive_buffer & caf::io::datagram_servant::rd_buf ( )
pure virtual

Returns the current input buffer.

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

◆ wr_buf()

virtual byte_buffer & caf::io::datagram_servant::wr_buf ( datagram_handle )
pure virtual

Returns a new output buffer.

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


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