rl_lang/docs/entries/stdlib/net/
udp_recv_from.rs1use crate::docs::entry::FnEntry;
2
3pub static UDP_RECV_FROM: FnEntry = FnEntry {
4 signature: "udp_recv_from(socket, max_bytes)",
5 description: "receives up to `max_bytes` from any sender, returning `(data, sender_addr)`",
6 example: r#"
7get std::net::udp_recv_from
8
9dec (string, string) result = result_unwrap(udp_recv_from(socket, 1024))"#,
10 expected_output: None,
11 returns: "Result[(string, string)]",
12 errors: Some("Err(string) on receive failure"),
13 see_also: &["udp_recv", "udp_send_to"],
14 since: Some("v0.1.5"),
15};