Enum rings_node::prelude::message::MessageHandlerEvent
source · pub enum MessageHandlerEvent {
Show 13 variants
Connect(Did),
ConnectVia(Did, Did),
Disconnect(Did),
AnswerOffer(MessagePayload<Message>, ConnectNodeSend),
AcceptAnswer(Did, ConnectNodeReport),
ForwardPayload(MessagePayload<Message>, Option<Did>),
JoinDHT(MessagePayload<Message>, Did),
SendDirectMessage(Message, Did),
SendMessage(Message, Did),
SendReportMessage(MessagePayload<Message>, Message),
ResetDestination(MessagePayload<Message>, Did),
StorageStore(VirtualNode),
Notify(Did),
}
Expand description
MessageHandlerEvent that will be handled by Swarm.
Variants§
Connect(Did)
Instructs the swarm to connect to a peer.
ConnectVia(Did, Did)
Instructs the swarm to connect to a peer via given next hop.
Disconnect(Did)
Instructs the swarm to disconnect from a peer.
AnswerOffer(MessagePayload<Message>, ConnectNodeSend)
Instructs the swarm to answer an offer inside payload by given sender’s Did and Message.
AcceptAnswer(Did, ConnectNodeReport)
Instructs the swarm to accept an answer inside payload by given sender’s Did and Message.
ForwardPayload(MessagePayload<Message>, Option<Did>)
Tell swarm to forward the payload to destination by given Payload and optional next hop.
JoinDHT(MessagePayload<Message>, Did)
Instructs the swarm to notify the dht about new peer.
SendDirectMessage(Message, Did)
Instructs the swarm to send a direct message to a peer.
SendMessage(Message, Did)
Instructs the swarm to send a message to a peer via the dht network.
SendReportMessage(MessagePayload<Message>, Message)
Instructs the swarm to send a message as a response to the received message.
ResetDestination(MessagePayload<Message>, Did)
Instructs the swarm to send a message to a peer via the dht network with a specific next hop.
StorageStore(VirtualNode)
Instructs the swarm to store vnode.
Notify(Did)
Notify a node
Trait Implementations§
source§impl Clone for MessageHandlerEvent
impl Clone for MessageHandlerEvent
source§fn clone(&self) -> MessageHandlerEvent
fn clone(&self) -> MessageHandlerEvent
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more