C++ Actor Framework 0.19
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
caf::io::network::datagram_servant_impl Class Reference

Default datagram servant implementation. More...

#include <datagram_servant_impl.hpp>

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

Public Types

using id_type = int64_t
 
- Public Types inherited from caf::io::broker_servant< Base, Handle, SysMsgType >
using handle_type = Handle
 

Public Member Functions

 datagram_servant_impl (default_multiplexer &mx, native_socket sockfd, id_type id)
 
bool new_endpoint (network::receive_buffer &buf) override
 
void ack_writes (bool enable) override
 Enables or disables write notifications.
 
byte_bufferwr_buf (datagram_handle hdl) override
 Returns a new output buffer.
 
void enqueue_datagram (datagram_handle hdl, byte_buffer buf) override
 Enqueue a buffer to be sent as a datagram.
 
network::receive_bufferrd_buf () override
 Returns the current input buffer.
 
void graceful_shutdown () override
 
void flush () override
 Flushes the output buffer, i.e., sends the content of the buffer via the network.
 
std::string addr (datagram_handle hdl) const override
 
uint16_t port (datagram_handle hdl) const override
 
uint16_t local_port () const override
 Returns the local port of associated socket.
 
std::vector< datagram_handlehdls () const override
 Returns all the handles associated with this servant.
 
void add_endpoint (const ip_endpoint &ep, datagram_handle hdl) override
 Adds a new remote endpoint identified by the ip_endpoint to the related manager.
 
void remove_endpoint (datagram_handle hdl) override
 
void launch () override
 
void add_to_loop () override
 
void remove_from_loop () override
 
void detach_handles () override
 
- Public Member Functions inherited from caf::io::datagram_servant
 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 (execution_unit *, datagram_handle hdl, network::receive_buffer &buf) override
 
void datagram_sent (execution_unit *, 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
 

Additional Inherited Members

- Protected Member Functions inherited from caf::io::datagram_servant
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 ()
 
- 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

Default datagram servant implementation.

Member Function Documentation

◆ ack_writes()

void caf::io::network::datagram_servant_impl::ack_writes ( bool  enable)
overridevirtual

Enables or disables write notifications.

Implements caf::io::datagram_servant.

◆ add_endpoint()

void caf::io::network::datagram_servant_impl::add_endpoint ( const ip_endpoint ep,
datagram_handle  hdl 
)
overridevirtual

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

Implements caf::io::datagram_servant.

◆ detach_handles()

void caf::io::network::datagram_servant_impl::detach_handles ( )
overridevirtual

◆ enqueue_datagram()

void caf::io::network::datagram_servant_impl::enqueue_datagram ( datagram_handle  ,
byte_buffer   
)
overridevirtual

Enqueue a buffer to be sent as a datagram.

Implements caf::io::datagram_servant.

◆ flush()

void caf::io::network::datagram_servant_impl::flush ( )
overridevirtual

Flushes the output buffer, i.e., sends the content of the buffer via the network.

Implements caf::io::datagram_servant.

◆ hdls()

std::vector< datagram_handle > caf::io::network::datagram_servant_impl::hdls ( ) const
overridevirtual

Returns all the handles associated with this servant.

Implements caf::io::datagram_servant.

◆ launch()

void caf::io::network::datagram_servant_impl::launch ( )
overridevirtual

◆ local_port()

uint16_t caf::io::network::datagram_servant_impl::local_port ( ) const
overridevirtual

Returns the local port of associated socket.

Implements caf::io::datagram_servant.

◆ rd_buf()

network::receive_buffer & caf::io::network::datagram_servant_impl::rd_buf ( )
overridevirtual

Returns the current input buffer.

Implements caf::io::datagram_servant.

◆ remove_endpoint()

void caf::io::network::datagram_servant_impl::remove_endpoint ( datagram_handle  hdl)
overridevirtual

◆ wr_buf()

byte_buffer & caf::io::network::datagram_servant_impl::wr_buf ( datagram_handle  )
overridevirtual

Returns a new output buffer.

Implements caf::io::datagram_servant.


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