Skip to content

Commit

Permalink
add platform notes
Browse files Browse the repository at this point in the history
Signed-off-by: Eliza Weisman <[email protected]>
  • Loading branch information
hawkw committed Nov 10, 2020
1 parent 91d9e9b commit 605d07a
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/net/tcp/socket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -211,10 +211,17 @@ impl TcpSocket {
/// support configuring the [keepalive time]: the time after which the OS
/// will start sending keepalive messages on an idle connection.
///
/// Additionally, this will enable TCP keepalive on this socket, if it is
/// not already enabled.
/// # Notes
///
/// * This will enable TCP keepalive on this socket, if it is not already
/// enabled.
/// * On some platforms, such as Windows, any keepalive parameters *not*
/// configured by the `TcpKeepalive` struct passed to this function may be
/// overwritten with their default values. Therefore, this function should
/// either only be called once per socket, or the same parameters should
/// be passed every time it is called.
///
/// For example:
/// # Examples
/// ```
/// use mio::net::{TcpSocket, TcpKeepalive};
/// use std::time::Duration;
Expand Down

0 comments on commit 605d07a

Please sign in to comment.