AddressIPSocket.bind

Assigns the wildcard "any" local address and optionally a port to this socket and memorises address and port. This socket needs to have been created by socket().

  1. int bind(cstring local_ip_address, ushort local_port)
  2. int bind(ushort local_port)
    class AddressIPSocket(bool IPv6 = false)
    override
    int
    bind
    (
    ushort local_port
    )

Parameters

local_port ushort

local port or 0 to use the wildcard "any" port

Return Value

Type: int

0 on success or -1 on failure. On failure errno is set appropriately.

Meta