ENet Unix system specific functions. More...
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/ioctl.h>
#include <sys/time.h>
#include <arpa/inet.h>
#include <netinet/tcp.h>
#include <netdb.h>
#include <unistd.h>
#include <string.h>
#include <errno.h>
#include <time.h>
#include "enet/enet.h"
Macros | |
#define | ENET_BUILDING_LIB 1 |
#define | MSG_NOSIGNAL 0 |
Typedefs | |
typedef int | socklen_t |
Functions | |
int | enet_address_get_host (const ENetAddress *address, char *name, 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 *name, 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 *name) |
Attempts to resolve the host named by the parameter hostName and sets the host field in the address parameter if successful. More... | |
void | enet_deinitialize (void) |
Shuts down ENet globally. More... | |
enet_uint32 | enet_host_random_seed (void) |
int | enet_initialize (void) |
Initializes ENet globally. More... | |
ENetSocket | enet_socket_accept (ENetSocket socket, ENetAddress *address) |
int | enet_socket_bind (ENetSocket socket, const ENetAddress *address) |
int | enet_socket_connect (ENetSocket socket, const ENetAddress *address) |
ENetSocket | enet_socket_create (ENetSocketType type) |
void | enet_socket_destroy (ENetSocket socket) |
int | enet_socket_get_address (ENetSocket socket, ENetAddress *address) |
int | enet_socket_get_option (ENetSocket socket, ENetSocketOption option, int *value) |
int | enet_socket_listen (ENetSocket socket, int backlog) |
int | enet_socket_receive (ENetSocket socket, ENetAddress *address, ENetBuffer *buffers, size_t bufferCount) |
int | enet_socket_send (ENetSocket socket, const ENetAddress *address, const ENetBuffer *buffers, size_t bufferCount) |
int | enet_socket_set_option (ENetSocket socket, ENetSocketOption option, int value) |
int | enet_socket_shutdown (ENetSocket socket, ENetSocketShutdown how) |
int | enet_socket_wait (ENetSocket socket, enet_uint32 *condition, enet_uint32 timeout) |
int | enet_socketset_select (ENetSocket maxSocket, ENetSocketSet *readSet, ENetSocketSet *writeSet, enet_uint32 timeout) |
enet_uint32 | enet_time_get (void) |
Returns the wall-time in milliseconds. More... | |
void | enet_time_set (enet_uint32 newTimeBase) |
Sets the current wall-time in milliseconds. More... | |
ENet Unix system specific functions.
#define ENET_BUILDING_LIB 1 |
#define MSG_NOSIGNAL 0 |
Referenced by enet_socket_receive(), and enet_socket_send().
enet_uint32 enet_host_random_seed | ( | void | ) |
enet_uint32 enet_time_get | ( | void | ) |
Returns the wall-time in milliseconds.
Its initial value is unspecified unless otherwise set.
Referenced by enet_host_bandwidth_throttle(), enet_host_flush(), and enet_host_service().
void enet_time_set | ( | enet_uint32 | newTimeBase | ) |
Sets the current wall-time in milliseconds.