rl_lang/docs/entries/stdlib/net/
tcp_accept.rs1use crate::docs::entry::FnEntry;
2
3pub static TCP_ACCEPT: FnEntry = FnEntry {
4 signature: "tcp_accept(listener)",
5 description: "blocks until a client connects, then returns a stream handle for that connection",
6 example: r#"
7get std::net::tcp_accept
8
9dec int stream = result_unwrap(tcp_accept(listener))"#,
10 expected_output: None,
11 returns: "Result[int]",
12 errors: Some("Err(string) on accept failure"),
13 see_also: &["tcp_listen", "tcp_read", "tcp_write"],
14 since: Some("v0.1.5"),
15};