Core¶
-
class socket¶
Represents an nng_socket.
Public Functions
-
inline ~socket()¶
-
inline void set_options(const socket_opt opts)¶
-
inline socket_opt options() const¶
-
inline void dial(const char *addr)¶
-
inline void listen(const char *addr)¶
-
inline nngxx::ctx make_ctx()¶
-
inline void send_aio(nngxx::aio_view &a)¶
-
inline void recv_aio(nngxx::aio_view &a)¶
-
inline void recv()¶
-
inline void stop()¶
-
inline int id() const¶
-
inline int socket_id() const¶
-
inline const char *proto_name() const¶
-
inline ~socket()¶
-
struct socket_opt¶
Represents the options that can be configured for a given socket.
These can be nng_options for an nng_socket, or they can be options of the nng_req protocol.
-
class context¶
-
struct context_opt¶
-
class context_registry¶
-
class op¶
Public Functions
-
inline ~op()¶
-
inline explicit operator bool()¶
-
template<ev::event_c event_t, tool_c tool_t>
inline void send(ev::enqueuer &r, tool_t &t, pipe p, event_t ev)¶
-
inline void sleep(nng_duration ms, std::function<void()> f)¶
-
inline void reset_sleep(nng_duration ms)¶
-
inline std::error_code result() const¶
return result of asynchronous operation
The nng_aio_result() returns the result of the operation associated with the handle aio. If the operation was successful, then 0 is returned. Otherwise a non-zero error code is returned.
- Returns:
-
inline void abort(nngxx::err err)¶
abort asynchronous I/O operation
The abort() function aborts an operation previously started with the handle aio.
If the operation is aborted, then the callback for the handle will be called, and the function result() will return the error err.
- Parameters:
err –
-
inline void cancel()¶
cancel asynchronous I/O operation
The nng_aio_cancel() function aborts an operation previously started with the handle aio. If the operation is aborted, then the callback for the handle will be called, and the function nng_aio_result() will return the error NNG_ECANCELED.
This function does not wait for the operation to be fully aborted, but returns immediately.
If no operation is currently in progress (either because it has already finished, or no operation has been started yet), then this function has no effect.
Same as abort(nngxx::error::canceled)
-
inline void wait() const¶
wait for asynchronous I/O operation
The nng_aio_wait() function waits for an asynchronous I/O operation to complete. If the operation has not been started, or has already completed, then it returns immediately.
-
inline ~op()¶
-
class pipe : public clev::iface<nng_pipe>¶
-
class tool_view¶
Represents an nng_socket or nng_ctx view.
Warning
doxygentypedef: Cannot find typedef “nngxx::cb_f” in doxygen xml output for project “pars” from directory: /home/runner/work/pars/pars/out/build/linux-debug-llvm/docs/doxygen/xml
-
static std::size_t pars::hash_from_uuid(const std::string_view &uuid)¶
-
static std::size_t pars::hash_from_msg(const nngxx::msg &m)¶