Skip to content

UDPSocket.send ​

js
    UDPSocket.send(Object object)

Sends a message to the specified IP and port.

Parameters

  • Object object: input parameter

object property description:

PropertyTypeDefaultRequiredDescription
addressstringYesThe address to send the message to; can be any IP or domain name
portnumberYesThe port number to send the message to
messagestring/ArrayBufferYesThe data to send
offsetnumber0NoThe offset of the data to send; only valid when message is an ArrayBuffer
lengthnumbermessage.byteLengthNoThe length of the data to send; only valid when message is an ArrayBuffer