Skip to main content

rl_lang/docs/entries/stdlib/net/
udp_send.rs

1use crate::docs::entry::FnEntry;
2
3pub static UDP_SEND: FnEntry = FnEntry {
4    signature: "udp_send(socket, data)",
5    description: "sends `data` to the socket's connected peer (see `udp_connect`)",
6    example: r#"
7get std::net::udp_send
8
9result_unwrap(udp_send(socket, "ping"))"#,
10    expected_output: None,
11    returns: "Result[int]",
12    errors: Some("Err(string) if the socket has no connected peer, or on send failure"),
13    see_also: &["udp_connect", "udp_send_to"],
14    since: Some("v0.1.5"),
15};