Represents an nng_push protocol.
More...
#include <push.h>
|
| | push (ev::hf_registry &h, ev::enqueuer &r) |
| | Construct a push.
|
| |
| socket & | sock () |
| | Get the socket.
|
| |
| const socket & | sock () 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) |
| |
Represents an nng_push protocol.
Definition at line 42 of file push.h.
◆ push()
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().
◆ 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().
◆ 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)
handler_f< kind_of, event_t > make_hf(mem_fn_t &mem_fn, class_t *self)
References insert(), and pars::ev::make_hf().
◆ sock() [1/2]
| socket & pars::net::push::sock |
( |
| ) |
|
|
inline |
Get the socket.
Definition at line 53 of file push.h.
◆ sock() [2/2]
| const socket & pars::net::push::sock |
( |
| ) |
const |
|
inline |
Get the socket.
Definition at line 56 of file push.h.
◆ stop()
| void pars::net::push::stop |
( |
| ) |
|
|
inline |
Stop socket.
Definition at line 59 of file push.h.
The documentation for this class was generated from the following file:
- /home/runner/work/pars-cxx/pars-cxx/lib/include/pars/net/push.h