InetAddress.inet_pton

Sets the address field (sin_addr/sin6_addr) of this.addr to the address represented by the string in src. src is expected to contain a valid IP address.

  1. int inet_pton(cstring ip_address_str)
    struct InetAddress(bool IPv6 = false)
    int
    inet_pton
  2. int inet_pton(char* ip_address_str)

Parameters

ip_address_str cstring

input IP address

Return Value

Type: int

1 on success or 0 if src does not contain a valid IP address.

Meta