AddressIPSocket.connect

Connects this socket the specified address and port and memorises address and port. This socket needs to have been created by socket().

  1. int connect(cstring remote_ip_address, ushort remote_port)
    class AddressIPSocket(bool IPv6 = false)
    override
    int
    connect
  2. int connect(InAddr remote_address)

Parameters

remote_ip_address cstring

remote IP address

remote_port ushort

remote port

Return Value

Type: int

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

Errors: as the overridden method but also sets errno to EINVAL if the address does not contain a valid IP address string.

Meta