Function tor_proto::time_since_last_incoming_traffic

source ·
pub fn time_since_last_incoming_traffic() -> Option<Duration>
Expand description

Return the amount of time since we last received “incoming traffic”.

This is a global counter, and is subject to interference from other users of the tor_proto. Its only permissible use is for checking how recently we have been definitely able to receive incoming traffic.

When enabled, this timestamp is updated whenever we receive a valid cell, and whenever we complete a channel handshake.

Returns None if we never received “incoming traffic”.