address
and family
from hostent
(to use with Sys::gethostbyname
)
# Set `address` and `family` from `hostent` (to use with `Sys::gethostbyname`)
fun fill_from_hostent(hostent: NativeSocketHostent) `{
self->sin_family = hostent->h_addrtype;
memcpy((char*)&self->sin_addr.s_addr,
(char*)hostent->h_addr,
hostent->h_length);
`}
lib/socket/socket_c.nit:286,2--292,3