rl_lang/docs/entries/stdlib/net/
tcp_set_timeout.rs1use crate::docs::entry::FnEntry;
2
3pub static TCP_SET_TIMEOUT: FnEntry = FnEntry {
4 signature: "tcp_set_timeout(stream, millis)",
5 description: "sets both the read and write timeout on a TCP stream; `0` clears the timeout (blocks indefinitely again)",
6 example: r#"
7get std::net::tcp_set_timeout
8
9result_unwrap(tcp_set_timeout(stream, 5000))"#,
10 expected_output: None,
11 returns: "Result[null]",
12 errors: Some("Err(string) if the timeout can't be set"),
13 see_also: &["tcp_set_nonblocking"],
14 since: Some("v0.1.5"),
15};