Expand description
Main API. Create connections, send and receive message, signals,…
Structs§
- Node
Handler - A shareable and clonable entity that allows to deal with the network, send signals and stop the node.
- Node
Listener - Listen events for network and signal events.
- Node
Task - 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 toNodeHandler::stop()
before or from another thread.
Enums§
- Node
Event - Event returned by
NodeListener::for_each()
andNodeListener::for_each_async()
when some network event or signal is received. - Stored
NetEvent - Analogous to
NetEvent
but with static lifetime (without reference the data). This kind of event is dispatched byNodeListener::to_event_queue()
and can be easily stored in any container. - Stored
Node Event - Analogous to
NodeEvent
but without reference the data. This kind of event is dispatched byNodeListener::to_event_queue()
. It is useful when you need to move anNodeEvent
Functions§
- split
- Creates a node already working.
This function offers two instances: a
NodeHandler
to perform network and signals actions and aNodeListener
to receive the events the node receives.