Subordination
A framework for distributed programming
Public Types | Public Member Functions | Friends | List of all members
sbn::socket_pipeline< K, S, R > Class Template Reference
Inheritance diagram for sbn::socket_pipeline< K, S, R >:
[legend]
Collaboration diagram for sbn::socket_pipeline< K, S, R >:
[legend]

Public Types

typedef S socket_type
 
typedef R router_type
 
typedef sys::ipv4_address addr_type
 
typedef sys::interface_address< addr_type > ifaddr_type
 
typedef remote_client< K, S, R > remote_client_type
 
typedef local_server< K, S, R > server_type
 
typedef std::shared_ptr< server_typeserver_ptr
 
typedef basic_socket_pipeline< K > base_pipeline
 
- Public Types inherited from sbn::basic_socket_pipeline< K >
typedef basic_handler handler_type
 
typedef std::shared_ptr< handler_typeevent_handler_ptr
 
typedef std::unordered_map< sys::fd_type, event_handler_ptrhandler_container_type
 
typedef handler_container_type::const_iterator handler_const_iterator
 
typedef handler_type::clock_type clock_type
 
typedef handler_type::time_point time_point
 
typedef handler_type::duration duration
 
typedef Proxy_pipeline_base< K > base_pipeline
 
typedef K kernel_type
 
typedef Mutex mutex_type
 
typedef Lock lock_type
 
typedef Semaphore sem_type
 
typedef Kernels kernel_pool
 
- Public Types inherited from sbn::basic_pipeline< T, Kernels, Traits, Threads, Mutex, Lock, Semaphore >
typedef T kernel_type
 
typedef Kernels kernel_pool
 
typedef Threads thread_pool
 
typedef Mutex mutex_type
 
typedef Lock lock_type
 
typedef Semaphore sem_type
 
typedef Traits traits_type
 
- Public Types inherited from sbn::pipeline_base
typedef std::chrono::system_clock clock_type
 
typedef clock_type::time_point time_point
 
typedef clock_type::duration duration
 

Public Member Functions

 socket_pipeline (const socket_pipeline &)=delete
 
 socket_pipeline (socket_pipeline &&)=delete
 
socket_pipelineoperator= (const socket_pipeline &)=delete
 
socket_pipelineoperator= (socket_pipeline &&)=delete
 
void add_client (const sys::socket_address &addr)
 
void stop_client (const sys::socket_address &addr)
 
void set_client_weight (const sys::socket_address &addr, weight_type new_weight)
 
void add_server (const ifaddr_type &rhs)
 
void add_server (const sys::socket_address &rhs, addr_type netmask)
 
void forward (foreign_kernel *hdr)
 
void set_port (sys::port_type rhs) noexcept
 
sys::port_type port () const noexcept
 
server_const_iterator servers_begin () const noexcept
 
server_const_iterator servers_end () const noexcept
 
void use_localhost (bool b) noexcept
 
void remove_server (const ifaddr_type &interface_address)
 
void print_state (std::ostream &out)
 
- Public Member Functions inherited from sbn::basic_socket_pipeline< K >
 basic_socket_pipeline (basic_socket_pipeline &&rhs) noexcept
 
 basic_socket_pipeline (const basic_socket_pipeline &)=delete
 
basic_socket_pipelineoperator= (const basic_socket_pipeline &)=delete
 
void set_other_mutex (mutex_type *rhs) noexcept
 
mutex_type * other_mutex () noexcept
 
mutex_type * mutex () noexcept
 
- Public Member Functions inherited from sbn::basic_pipeline< T, Kernels, Traits, Threads, Mutex, Lock, Semaphore >
 basic_pipeline (unsigned concurrency) noexcept
 
 basic_pipeline (basic_pipeline &&rhs) noexcept
 
 basic_pipeline (const basic_pipeline &)=delete
 
basic_pipelineoperator= (const basic_pipeline &)=delete
 
void send (kernel_type *k)
 
void send (kernel_type **kernels, size_t n)
 
void start ()
 
void stop ()
 
void wait ()
 
unsigned concurrency () const noexcept
 
- Public Member Functions inherited from sbn::pipeline_base
 pipeline_base (pipeline_base &&)=default
 
 pipeline_base (const pipeline_base &)=delete
 
pipeline_baseoperator= (pipeline_base &)=delete
 
void setstate (pipeline_state rhs) noexcept
 
pipeline_state state () const noexcept
 
bool is_starting () const noexcept
 
bool has_started () const noexcept
 
bool is_running () const noexcept
 
bool is_stopping () const noexcept
 
bool has_stopped () const noexcept
 
time_point start_time_point () const noexcept
 
bool has_start_time_point () const noexcept
 
const char * name () const noexcept
 
void set_name (const char *rhs) noexcept
 
void set_number (unsigned rhs) noexcept
 
template<class ... Args>
void log (const Args &... args) const
 
void log_error (const std::exception &err) const
 

Friends

template<class K1 , class S1 , class R1 >
class local_server
 
template<class K1 , class S1 , class R1 >
class remote_client
 
template<class K1 , class S1 , class R1 >
class socket_notify_handler
 

Additional Inherited Members

- Protected Types inherited from sbn::basic_pipeline< T, Kernels, Traits, Threads, Mutex, Lock, Semaphore >
typedef std::vector< std::unique_ptr< kernel_type > > kernel_sack
 
typedef queue_pop_iterator< kernel_pool, traits_type > queue_popper
 
- Protected Member Functions inherited from sbn::basic_socket_pipeline< K >
sem_type & poller () noexcept
 
const sem_type & poller () const noexcept
 
void emplace_handler (const sys::epoll_event &ev, const event_handler_ptr &ptr)
 
void emplace_handler (const sys::epoll_event &ev, const std::shared_ptr< X > &ptr)
 
void emplace_notify_handler (const event_handler_ptr &ptr)
 
void emplace_notify_handler (const std::shared_ptr< X > &ptr)
 
void do_run () override
 
void run (Thread_context *) override
 
void set_start_timeout (const duration &rhs) noexcept
 
- Protected Member Functions inherited from sbn::basic_pipeline< T, Kernels, Traits, Threads, Mutex, Lock, Semaphore >
void xstop ()
 
- Protected Attributes inherited from sbn::basic_socket_pipeline< K >
handler_container_type _handlers
 
duration _start_timeout
 
- Protected Attributes inherited from sbn::basic_pipeline< T, Kernels, Traits, Threads, Mutex, Lock, Semaphore >
kernel_pool _kernels
 
thread_pool _threads
 
mutex_type _mutex
 
sem_type _semaphore
 
- Protected Attributes inherited from sbn::pipeline_base
volatile pipeline_state _state = pipeline_state::initial
 
time_point _start = time_point(duration::zero())
 
const char * _name = "ppl"
 
unsigned _number = 0
 

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