InetAddress.opCall

Sets this.addr to the IP address in ip_address_str and the port to port.

  1. sockaddr* opCall(cstring ip_address_str, ushort port)
    struct InetAddress(bool IPv6 = false)
    sockaddr*
    opCall
    (,
    ushort port = 0
    )
  2. sockaddr* opCall(ushort port)

Parameters

ip_address_str cstring

IP address string

port ushort

port

Return Value

Type: sockaddr*

a sockaddr pointer to this.addr on success. If ip_address_str does not contain a valid IP address, null is returned and errno set to EINVAL (this error is reported by this wrapper, not the underlying POSIX function).

Meta