Struct rustarium::socket::Socket [] [src]

pub struct Socket { /* fields omitted */ }

Wrapper around UdpSocket.

Methods

impl Socket
[src]

[src]

Create a new Socket.

This function binds to the computer's local IP address. To bind to a custom address, use Socket::new_any_ip()

[src]

Create a new Socket bound to any IP address.

[src]

Get a message, if one is waiting.

Returns the sender's SocketAddr, and a String containing the message text itself.

Returns None if there are no waiting messages.

[src]

Send a message.