Represents an nng_req protocol.
More...
#include <req.h>
Represents an nng_req protocol.
Definition at line 44 of file req.h.
◆ req()
Construct a req.
Definition at line 48 of file req.h.
49 : sock_m{r, nngxx::req::v0::make_socket().value_or_abort()}
50 , ctx_registry_m{r, sock_m}
51 , hf_registry_m{h}
52 {
53 }
References req().
Referenced by req().
◆ ctxs()
◆ insert()
template<template< typename > typename kind_of, ev::event_c event_t>
requires ev::kind_c<kind_of>
| void pars::net::req::insert |
( |
ev::handler_f< kind_of, event_t > | hf | ) |
|
|
inline |
Definition at line 82 of file req.h.
83 {
84 hf_registry_m.insert(sock_m.id(), std::move(hf));
85 }
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::req::on |
( |
void(class_t::* | hf )(ev::hf_arg< kind_of, event_t >), |
|
|
class_t * | self ) |
|
inline |
Definition at line 75 of file req.h.
76 {
78 }
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::req::sock |
( |
| ) |
|
|
inline |
Get the socket.
Definition at line 56 of file req.h.
◆ sock() [2/2]
| const socket & pars::net::req::sock |
( |
| ) |
const |
|
inline |
Get the socket.
Definition at line 59 of file req.h.
◆ stop()
| void pars::net::req::stop |
( |
| ) |
|
|
inline |
Stop socket and all contexts.
Definition at line 65 of file req.h.
66 {
67 sock_m.stop();
68
69 ctx_registry_m.stop_all();
70 }
The documentation for this class was generated from the following file:
- /home/runner/work/pars-cxx/pars-cxx/lib/include/pars/net/req.h