# Host entry information, a pointer to a `struct hostent`
extern class NativeSocketHostent `{ struct hostent* `}
private fun native_h_aliases(i: Int): CString `{
return self->h_aliases[i];
`}
# Alternative names for the host
fun h_aliases: Array[String]
do
var res = new Array[String]
loop
var ha = native_h_aliases(res.length)
if ha.address_is_null then break
res.add ha.to_s
end
return res
end
# Host IPv4 address
fun h_addr: CString `{
return (char*)inet_ntoa(*(struct in_addr*)self->h_addr);
`}
# Host address type
fun h_addrtype: Int `{ return self->h_addrtype; `}
# Length in bytes of the addresses
fun h_length: Int `{ return self->h_length; `}
# Host name
fun h_name: CString `{ return self->h_name; `}
end
lib/socket/socket_c.nit:316,1--347,3