nlGetAddrFromName, nlGetAddrFromNameAsync

resolves an address from a name

C Specification

NLboolean nlGetAddrFromName(const NLchar *name, NLaddress * address)

NLboolean nlGetAddrFromNameAsync(const NLchar *name, NLaddress * address)



[in]Specifies a pointer to the name string.

[out]Specifies a pointer to the address allocated by the caller.


nlGetAddrFromName and nlGetAddrFromNameAsync resolve name to an address. If name is already a numeric address in the format, they will call nlStringToAddr internally. When the name is resolved address.valid will be set to NL_TRUE. If the name cannot be resolved, then address.valid is set to NL_FALSE.

Return values

NL_TRUE if no error occurs, otherwise NL_FALSE, and the specific error code can be retrieved by calling nlGetError

Error codes

NL_NULL_POINTER : A NULL pointer was passed to this function.
NL_OUT_OF_MEMORY : Not enough memory.
NL_SYSTEM_ERROR : A system Socket error has ocurred. The system error can be retrieved by calling nlGetSystemError.

See also


Back to the HawkNL index page

Go directly to the main HawkNL page at Hawk Software

© 2000-2002 Phil Frisbie.

Valid XHTML 1.0!