ENet: ENet address functions

ENet v1.3.18 Reliable UDP networking library

Functions
ENet address functions

## Functions
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. More...
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. More...
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. More...
int | enet_address_set_host_ip (ENetAddress *address, const char *hostName)
| Attempts to parse the printable form of the IP address in the parameter hostName and sets the host field in the address parameter if successful. More...

## Detailed Description

## Function Documentation

## ◆ enet_address_get_host()

int enet_address_get_host | ( | const ENetAddress * | address,
|  | char * | hostName,
|  | size_t | nameLength
| ) |  |

`#include <include/enet/enet.h>`

Attempts to do a reverse lookup of the host field in the address parameter.

Parameters

  address | address used for reverse lookup
  hostName | destination for name, must not be NULL
  nameLength | maximum length of hostName.

Returns
  the null-terminated name of the host in hostName on success

Return values

  0 | on success
  < | 0 on failure

## ◆ enet_address_get_host_ip()

int enet_address_get_host_ip | ( | const ENetAddress * | address,
|  | char * | hostName,
|  | size_t | nameLength
| ) |  |

`#include <include/enet/enet.h>`

Gives the printable form of the IP address specified in the address parameter.

Parameters

  address | address printed
  hostName | destination for name, must not be NULL
  nameLength | maximum length of hostName.

Returns
  the null-terminated name of the host in hostName on success

Return values

  0 | on success
  < | 0 on failure

## ◆ enet_address_set_host()

int enet_address_set_host | ( | ENetAddress * | address,
|  | const char * | hostName
| ) |  |

`#include <include/enet/enet.h>`

Attempts to resolve the host named by the parameter hostName and sets the host field in the address parameter if successful.

Parameters

  address | destination to store resolved address
  hostName | host name to lookup

Return values

  0 | on success
  < | 0 on failure

Returns
  the address of the given hostName in address on success

## ◆ enet_address_set_host_ip()

int enet_address_set_host_ip | ( | ENetAddress * | address,
|  | const char * | hostName
| ) |  |

`#include <include/enet/enet.h>`

Attempts to parse the printable form of the IP address in the parameter hostName and sets the host field in the address parameter if successful.

Parameters

  address | destination to store the parsed IP address
  hostName | IP address to parse

Return values

  0 | on success
  < | 0 on failure

Returns
  the address of the given hostName in address on success