pars 0.2.1.99
Loading...
Searching...
No Matches
pars::net::push Class Reference

Represents an nng_push protocol. More...

#include <push.h>

Public Member Functions

 push (ev::hf_registry &h, ev::enqueuer &r)
 Construct a push.
 
socketsock ()
 Get the socket.
 
const socketsock () const
 Get the socket.
 
void stop ()
 Stop socket.
 
template<template< typename > typename kind_of, ev::event_c event_t, typename class_t>
requires ev::kind_c<kind_of>
void on (void(class_t::*hf)(ev::hf_arg< kind_of, event_t >), class_t *self)
 
template<template< typename > typename kind_of, ev::event_c event_t>
requires ev::kind_c<kind_of>
void insert (ev::handler_f< kind_of, event_t > hf)
 

Detailed Description

Represents an nng_push protocol.

Definition at line 42 of file push.h.

Constructor & Destructor Documentation

◆ push()

pars::net::push::push ( ev::hf_registry & h,
ev::enqueuer & r )
inline

Construct a push.

Definition at line 46 of file push.h.

47 : sock_m{r, nngxx::push::v0::make_socket().value_or_abort()}
48 , hf_registry_m{h}
49 {
50 }

References push().

Referenced by push().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Function Documentation

◆ insert()

template<template< typename > typename kind_of, ev::event_c event_t>
requires ev::kind_c<kind_of>
void pars::net::push::insert ( ev::handler_f< kind_of, event_t > hf)
inline

Definition at line 71 of file push.h.

72 {
73 hf_registry_m.insert(sock_m.id(), std::move(hf));
74 }

Referenced by on().

Here is the caller graph for this function:

◆ on()

template<template< typename > typename kind_of, ev::event_c event_t, typename class_t>
requires ev::kind_c<kind_of>
void pars::net::push::on ( void(class_t::* hf )(ev::hf_arg< kind_of, event_t >),
class_t * self )
inline

Definition at line 64 of file push.h.

65 {
67 }
void insert(ev::handler_f< kind_of, event_t > hf)
Definition push.h:71
handler_f< kind_of, event_t > make_hf(mem_fn_t &mem_fn, class_t *self)
Definition make_hf.h:58

References insert(), and pars::ev::make_hf().

Here is the call graph for this function:

◆ sock() [1/2]

socket & pars::net::push::sock ( )
inline

Get the socket.

Definition at line 53 of file push.h.

53{ return sock_m; }

◆ sock() [2/2]

const socket & pars::net::push::sock ( ) const
inline

Get the socket.

Definition at line 56 of file push.h.

56{ return sock_m; }

◆ stop()

void pars::net::push::stop ( )
inline

Stop socket.

Definition at line 59 of file push.h.

59{ sock_m.stop(); }

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