rl_lang/docs/entries/stdlib/net/
udp_bind.rs1use crate::docs::entry::FnEntry;
2
3pub static UDP_BIND: FnEntry = FnEntry {
4 signature: "udp_bind(addr)",
5 description: "binds a UDP socket to \"host:port\" and returns a socket handle",
6 example: r#"
7get std::net::udp_bind
8
9dec int socket = result_unwrap(udp_bind("127.0.0.1:9000"))"#,
10 expected_output: None,
11 returns: "Result[int]",
12 errors: Some("Err(string) if the address can't be bound"),
13 see_also: &["udp_recv_from", "udp_close"],
14 since: Some("v0.1.5"),
15};