Struct loirc::MonitorSettings [] [src]

pub struct MonitorSettings {
    pub activity_timeout: Duration,
    pub ping_timeout: Duration,
}

These settings tell the monitor how to behave.

They allow you to configure the amount of time between the steps.

Fields

activity_timeout

Amount of time since the last activity.

When the amount of time since the last activity gets higher than this value, tt will trigger a ping request. If there is not a lot of activity, this means that the server will be pinged everytime this duration expires.

ping_timeout

Amount of time to wait for a ping reply.

When the amount of time since the ping was sent gets higher than this value, and that no activity occured, assume the connection was dropped and trigger and a disconnect.

Trait Implementations

impl Default for MonitorSettings

Default values are provided for the settings.

They are:

activity_timeout = 60 seconds

ping_timeout = 15 seconds

fn default() -> MonitorSettings

Derived Implementations

impl PartialEq for MonitorSettings

fn eq(&self, __arg_0: &MonitorSettings) -> bool

fn ne(&self, __arg_0: &MonitorSettings) -> bool

impl Eq for MonitorSettings

impl Debug for MonitorSettings

fn fmt(&self, __arg_0: &mut Formatter) -> Result

impl Clone for MonitorSettings

fn clone(&self) -> MonitorSettings

1.0.0fn clone_from(&mut self, source: &Self)

impl Copy for MonitorSettings