rl_lang/docs/entries/stdlib/net/
tcp_shutdown.rs1use crate::docs::entry::FnEntry;
2
3pub static TCP_SHUTDOWN: FnEntry = FnEntry {
4 signature: "tcp_shutdown(stream, mode)",
5 description: "shuts down the read side, write side, or both, of a TCP stream; `mode` is \"read\", \"write\", or \"both\"",
6 example: r#"
7get std::net::tcp_shutdown
8
9result_unwrap(tcp_shutdown(stream, "both"))"#,
10 expected_output: None,
11 returns: "Result[null]",
12 errors: Some("Err(string) on shutdown failure"),
13 see_also: &["tcp_close"],
14 since: Some("v0.1.5"),
15};