Updated documentation for ping_time and ping_timeout.

This commit is contained in:
Aaron Weiss 2017-06-28 20:44:22 -07:00
parent 4d3f4c556a
commit f0fa03e70a
No known key found for this signature in database
GPG key ID: 0237035D9BF03AE2

View file

@ -235,15 +235,14 @@ impl Config {
)
}
/// Gets the amount of time in seconds since last activity necessary for the client to ping the
/// server. This is also used as the timeout for receiving pings from the server.
/// Gets the amount of time in seconds for the interval at which the client pings the server.
/// This defaults to 180 seconds when not specified.
pub fn ping_time(&self) -> u32 {
self.ping_time.as_ref().cloned().unwrap_or(180)
}
/// Gets the amount of time in seconds for the client to disconnect after no ping response is
/// received.
/// Gets the amount of time in seconds for the client to disconnect after not receiving a ping
/// response.
/// This defaults to 10 seconds when not specified.
pub fn ping_timeout(&self) -> u32 {
self.ping_timeout.as_ref().cloned().unwrap_or(10)