enet
Functions
ENet address functions

Functions

ENET_API int enet_address_set_host (ENetAddress *address, const char *hostName)
 Attempts to resolve the host named by the parameter hostName and sets the host field in the address parameter if successful.
ENET_API int enet_address_get_host_ip (const ENetAddress *address, char *hostName, size_t nameLength)
 Gives the printable form of the ip address specified in the address parameter.
ENET_API int enet_address_get_host (const ENetAddress *address, char *hostName, size_t nameLength)
 Attempts to do a reverse lookup of the host field in the address parameter.

Detailed Description

Function Documentation

ENET_API int enet_address_get_host ( const ENetAddress address,
char *  hostName,
size_t  nameLength 
)
Parameters
addressaddress used for reverse lookup
hostNamedestination for name, must not be NULL
nameLengthmaximum length of hostName.
Returns
the null-terminated name of the host in hostName on success
Return values
0on success
<0 on failure

References enet_address_get_host_ip().

ENET_API int enet_address_get_host_ip ( const ENetAddress address,
char *  hostName,
size_t  nameLength 
)
Parameters
addressaddress printed
hostNamedestination for name, must not be NULL
nameLengthmaximum length of hostName.
Returns
the null-terminated name of the host in hostName on success
Return values
0on success
<0 on failure

Referenced by enet_address_get_host().

ENET_API int enet_address_set_host ( ENetAddress address,
const char *  hostName 
)
Parameters
addressdestination to store resolved address
hostNamehost name to lookup
Return values
0on success
<0 on failure
Returns
the address of the given hostName in address on success