UdpSocket.receive

Receive a formatted packet of data from a remote peer.

In blocking mode, this function will wait until the whole packet has been received.

  1. Status receive(void[] data, out size_t sizeReceived, out IpAddress address, out ushort port)
  2. Status receive(Packet packet, out IpAddress address, out ushort port)
    class UdpSocket
    Status
    receive

Parameters

packet
Type: Packet

Packet to fill with the received data

address
Type: IpAddress

Address of the peer that sent the data

port
Type: ushort

Port of the peer that sent the data

Return Value

Type: Status

Status code.

Meta