Module message_io::node
source · [−]Expand description
Main API. Create connections, send and receive message, signals,…
Structs
A shareable and clonable entity that allows to deal with the network, send signals and stop the node.
Listen events for network and signal events.
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
Event returned by NodeListener::for_each()
and NodeListener::for_each_async()
when some network event or signal is received.
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.
Functions
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.