nn::socket::GetHostByName Function

Syntax

HostEnt * GetHostByName(
     const char8 * name
);

Arguments

Name Description
in name Specifies a pointer to a host name string or to a string that represents the IPv4 host address in dotted-decimal notation. The string must be NULL-terminated.

Return Values

If successful, returns a pointer to a HostEnt structure containing the host's information. The structure instance is a library internal buffer.

Description

Searches for host information based on the host name.

Since this function might query the DNS server, it blocks until the search is complete. The GetHostByName function is neither reentrant nor thread-safe. Use the GetAddrInfo function instead if you need to call from multiple threads.

On failure, returns NULL.

See Also

GetHostByAddr, GetAddrInfo

Revision History

2010/06/14
Initial version.

CONFIDENTIAL