pub enum LinkManagerAction {
Show 15 variants
SendPacket {
raw: Vec<u8>,
dest_type: u8,
attached_interface: Option<InterfaceId>,
},
LinkEstablished {
link_id: LinkId,
dest_hash: [u8; 16],
rtt: f64,
is_initiator: bool,
},
LinkClosed {
link_id: LinkId,
reason: Option<TeardownReason>,
},
RemoteIdentified {
link_id: LinkId,
identity_hash: [u8; 16],
public_key: [u8; 64],
},
RegisterLinkDest {
link_id: LinkId,
},
DeregisterLinkDest {
link_id: LinkId,
},
ManagementRequest {
link_id: LinkId,
path_hash: [u8; 16],
data: Vec<u8>,
request_id: [u8; 16],
remote_identity: Option<([u8; 16], [u8; 64])>,
},
ResourceReceived {
link_id: LinkId,
data: Vec<u8>,
metadata: Option<Vec<u8>>,
},
ResourceCompleted {
link_id: LinkId,
},
ResourceFailed {
link_id: LinkId,
error: String,
},
ResourceProgress {
link_id: LinkId,
received: usize,
total: usize,
},
ResourceAcceptQuery {
link_id: LinkId,
resource_hash: Vec<u8>,
transfer_size: u64,
has_metadata: bool,
},
ChannelMessageReceived {
link_id: LinkId,
msgtype: u16,
payload: Vec<u8>,
},
LinkDataReceived {
link_id: LinkId,
context: u8,
data: Vec<u8>,
},
ResponseReceived {
link_id: LinkId,
request_id: [u8; 16],
data: Vec<u8>,
},
}Expand description
Actions produced by LinkManager for the driver to dispatch.
Variants§
SendPacket
Send a packet via the transport engine outbound path.
LinkEstablished
Link established — notify callbacks.
LinkClosed
Link closed — notify callbacks.
RemoteIdentified
Remote peer identified — notify callbacks.
RegisterLinkDest
Register a link_id as local destination in transport (for receiving link data).
DeregisterLinkDest
Deregister a link_id from transport local destinations.
ManagementRequest
A management request that needs to be handled by the driver. The driver has access to engine state needed to build the response.
Fields
ResourceReceived
Resource data fully received and assembled.
ResourceCompleted
Resource transfer completed (proof validated on sender side).
ResourceFailed
Resource transfer failed.
ResourceProgress
Resource transfer progress update.
ResourceAcceptQuery
Query application whether to accept an incoming resource (for AcceptApp strategy).
ChannelMessageReceived
Channel message received on a link.
LinkDataReceived
Generic link data received (CONTEXT_NONE).
ResponseReceived
Response received on a link.