pub enum TriggerEvent {
NormalRecv,
PaddingRecv,
TunnelRecv,
NormalSent,
PaddingSent {
machine: MachineId,
},
TunnelSent,
BlockingBegin {
machine: MachineId,
},
BlockingEnd,
TimerBegin {
machine: MachineId,
},
TimerEnd {
machine: MachineId,
},
}
Expand description
Represents an event to be triggered in the framework.
Variants§
NormalRecv
Received non-padding packet.
This event should be triggered once for each incoming non-padding
packet, after TunnelRecv
, as soon as we have identified the packet as
non-padding.
PaddingRecv
Received padding packet.
This event should be triggered once for each incoming padding packet,
after TunnelRecv
, as soon as we have identified the packet as padding.
TunnelRecv
Received a complete packet in the tunnel.
This event should be triggered once for each incoming packet of any type, as soon as possible after the packet is received from the network, before the packet is queued, processed, or decrypted.
(No event should be generated for a partially read packet.)
NormalSent
Sent non-padding packet.
This event should be triggered once for each outgoing non-padding packet, as soon as we have decided put it on any internal queue.
PaddingSent
Sent padding packet.
This event should be triggered once for each outgoing padding packet, as soon as we have decided put it on any internal queue.
TunnelSent
Sent packet in the tunnel.
This event should be triggered once for each outgoing packet of any
type, after that packet’s NormalSent
or PaddingSent
event, as close
as possible to the time when it is actually written to the network.
BlockingBegin
Blocking of outgoing traffic started by the action from a machine.
This event should be triggered whenever the action timer for a
crate::action::TriggerAction::BlockOutgoing
action expires, whether
the blocking timer is adjusted or not.
BlockingEnd
Blocking of outgoing traffic has stopped.
This event should be triggered when the framework-scoped blocking timer expires.
TimerBegin
A machine’s internal timer started, or was changed.
This event should be triggered any time a new internal timer is started, or whenever the expiration time of an machine’s internal timer changes.
TimerEnd
A machine’s internal timer expired.
(This event should not be sent in response to a timer being cancelled.)
Implementations§
Source§impl TriggerEvent
impl TriggerEvent
Trait Implementations§
Source§impl Clone for TriggerEvent
impl Clone for TriggerEvent
Source§fn clone(&self) -> TriggerEvent
fn clone(&self) -> TriggerEvent
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more