Class PipelinePull
Defined in File pipeline.h
Inheritance Relationships
Base Type
public O3DS::BlockingNngConnector(Class BlockingNngConnector)
Class Documentation
-
class PipelinePull : public O3DS::BlockingNngConnector
Public Functions
-
virtual bool start(const char *url)
Opens the pull socket and starts a plain tcp:// listener on it in one step. Equivalent to open() followed by startListener(url, nullptr).
-
bool open()
Opens the pull socket without listening. Use this when the listener needs options (such as a TLS config) attached before it starts accepting - see startListener().
-
bool startListener(const char *url, nng_tls_config *tlsConfig)
Creates and starts a listener for this (already-open) socket, optionally attaching tlsConfig (server mode) beforehand. tlsConfig may be nullptr for a plain listener. Setting NNG_OPT_TLS_CONFIG places its own hold on tlsConfig, so the caller keeps ownership and may free its own reference once this call returns, whether it succeeded or not.
-
void closeListener()
Closes the current listener, if any. Per nng_listener_close’s own documentation this also drops every pipe it accepted - not just future connections - so this is also how an already-connected client gets disconnected. The socket itself stays open, ready for a later startListener() call. No-op if no listener is active.
-
bool notifyPipeEvent(nng_pipe_ev event, nng_pipe_cb callback, void *context)
Registers a pipe lifecycle callback on this socket - see nng_pipe_notify - e.g. to track a live source-pipe count for idle detection, or to reject new pipes while draining. Per nng_pipe_notify’s own documentation, at most one callback can be registered per event; a second call for the same event replaces the first. Safe to call as soon as open() has succeeded, before any listener exists.
-
virtual bool start(const char *url)