Updated docs for ping_time and ping_timeout.

This commit is contained in:
Aaron Weiss 2017-06-25 05:45:30 -04:00
parent 971745ca33
commit 1c0ccd11a9
No known key found for this signature in database
GPG key ID: 0237035D9BF03AE2

View file

@ -236,13 +236,14 @@ impl Config {
}
/// Gets the amount of time in seconds since last activity necessary for the client to ping the
/// server.
/// server. This is also used as the timeout for receiving pings from 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 reconnect after no ping response.
/// Gets the amount of time in seconds for the client to disconnect after no ping response is
/// received.
/// This defaults to 10 seconds when not specified.
pub fn ping_timeout(&self) -> u32 {
self.ping_timeout.as_ref().cloned().unwrap_or(10)