API Reference › Udp › Udp.from_port
method

Udp.from_port

Udp.from_port(socket) -> int

The port the last datagram read on this socket came from.

Example

program Demo {
  entry {
    let s = Udp.open(port: 0)
    print(Udp.from_port(socket: s))
  }
}
← All symbols