Skip to content

UDPSocket.bind ​

js
    number UDPSocket.bind(number port)

Binds a random available port assigned by the system, or binds a specified port number.

Parameters

  • number port: the port number to bind; if omitted, returns a random available port assigned by the system

Return Value

  • number: the successfully bound port number