UdpSocket.send

Send a formatted packet of data to a remote peer.

Make sure that the packet size is not greater than UdpSocket.MaxDatagramSize, otherwise this function will fail and no data will be sent.

  1. Status send(const(void)[] data, IpAddress address, ushort port)
  2. Status send(Packet packet, IpAddress address, ushort port)
    class UdpSocket
    Status
    send

Parameters

packet
Type: Packet

Packet to send

address
Type: IpAddress

Address of the receiver

port
Type: ushort

Port of the receiver to send the data to

Return Value

Type: Status

Status code.

Meta