Module node

Source
Expand description

Main API. Create connections, send and receive message, signals,…

Structs§

NodeHandler
A shareable and clonable entity that allows to deal with the network, send signals and stop the node.
NodeListener
Listen events for network and signal events.
NodeTask
Entity used to ensure the lifetime of NodeListener::for_each_async() call. The node will process events asynchronously while this entity lives. The destruction of this entity will block until the task is finished. If you want to “unblock” the thread that drops this entity call to NodeHandler::stop() before or from another thread.

Enums§

NodeEvent
Event returned by NodeListener::for_each() and NodeListener::for_each_async() when some network event or signal is received.
StoredNetEvent
Analogous to NetEvent but with static lifetime (without reference the data). This kind of event is dispatched by NodeListener::to_event_queue() and can be easily stored in any container.
StoredNodeEvent
Analogous to NodeEvent but without reference the data. This kind of event is dispatched by NodeListener::to_event_queue(). It is useful when you need to move an NodeEvent

Functions§

split
Creates a node already working. This function offers two instances: a NodeHandler to perform network and signals actions and a NodeListener to receive the events the node receives.