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

Represents an nng_pull protocol. More...

#include <pull.h>

Public Member Functions

 pull (ev::hf_registry &h, ev::enqueuer &r)
 Construct a pull.
 
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_pull protocol.

Definition at line 43 of file pull.h.

Constructor & Destructor Documentation

◆ pull()

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

Construct a pull.

Definition at line 47 of file pull.h.

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

References pull().

Referenced by pull().

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::pull::insert ( ev::handler_f< kind_of, event_t > hf)
inline

Definition at line 72 of file pull.h.

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

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::pull::on ( void(class_t::* hf )(ev::hf_arg< kind_of, event_t >),
class_t * self )
inline

Definition at line 65 of file pull.h.

66 {
68 }
void insert(ev::handler_f< kind_of, event_t > hf)
Definition pull.h:72
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::pull::sock ( )
inline

Get the socket.

Definition at line 54 of file pull.h.

54{ return sock_m; }

◆ sock() [2/2]

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

Get the socket.

Definition at line 57 of file pull.h.

57{ return sock_m; }

◆ stop()

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

Stop socket.

Definition at line 60 of file pull.h.

60{ sock_m.stop(); }

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