UdpSocket.receive

Receive raw data from a remote peer.

In blocking mode, this function will wait until some bytes are actually received.

Be careful to use a buffer which is large enough for the data that you intend to receive, if it is too small then an error will be returned and all the data will be lost.

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

Parameters

data void[]

The array to fill with the received bytes

sizeReceived size_t

The number of bytes received

address IpAddress

Address of the peer that sent the data

port ushort

Port of the peer that sent the data

Return Value

Type: Status

Status code.

Meta