C++ Actor Framework 0.18
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Member Functions | List of all members
caf::io::middleman_actor_impl Class Reference

Default implementation of the middleman_actor interface. More...

#include <middleman_actor_impl.hpp>

Inherits middleman_actor::base.

Public Types

using put_res = result< uint16_t >
 
using mpi_set = std::set< std::string >
 
using get_res = result< node_id, strong_actor_ptr, mpi_set >
 
using get_delegated = delegated< node_id, strong_actor_ptr, mpi_set >
 
using del_res = result< void >
 
using endpoint_data = std::tuple< node_id, strong_actor_ptr, mpi_set >
 
using endpoint = std::pair< std::string, uint16_t >
 

Public Member Functions

 middleman_actor_impl (actor_config &cfg, actor default_broker)
 
 middleman_actor_impl (middleman_actor_impl &&)=delete
 
 middleman_actor_impl (const middleman_actor_impl &)=delete
 
middleman_actor_imploperator= (middleman_actor_impl &&)=delete
 
middleman_actor_imploperator= (const middleman_actor_impl &)=delete
 
void on_exit () override
 
const char * name () const override
 
behavior_type make_behavior () override
 

Protected Member Functions

virtual expected< scribe_ptrconnect (const std::string &host, uint16_t port)
 Tries to connect to given host and port.
 
virtual expected< datagram_servant_ptrcontact (const std::string &host, uint16_t port)
 Tries to connect to given host and port.
 
virtual expected< doorman_ptropen (uint16_t port, const char *addr, bool reuse)
 Tries to open a local port.
 
virtual expected< datagram_servant_ptropen_udp (uint16_t port, const char *addr, bool reuse)
 Tries to open a local port.
 

Detailed Description

Default implementation of the middleman_actor interface.

Member Function Documentation

◆ connect()

virtual expected< scribe_ptr > caf::io::middleman_actor_impl::connect ( const std::string &  host,
uint16_t  port 
)
protectedvirtual

Tries to connect to given host and port.

The default implementation calls system().middleman().backend().new_tcp_scribe(host, port).

◆ contact()

virtual expected< datagram_servant_ptr > caf::io::middleman_actor_impl::contact ( const std::string &  host,
uint16_t  port 
)
protectedvirtual

Tries to connect to given host and port.

The default implementation calls system().middleman().backend().new_udp.

◆ open()

virtual expected< doorman_ptr > caf::io::middleman_actor_impl::open ( uint16_t  port,
const char *  addr,
bool  reuse 
)
protectedvirtual

Tries to open a local port.

The default implementation calls system().middleman().backend().new_tcp_doorman(port, addr, reuse).

◆ open_udp()

virtual expected< datagram_servant_ptr > caf::io::middleman_actor_impl::open_udp ( uint16_t  port,
const char *  addr,
bool  reuse 
)
protectedvirtual

Tries to open a local port.

The default implementation calls system().middleman().backend().new_tcp_doorman(port, addr, reuse).


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