Loading...
Searching...
No Matches
unix.h File Reference

ENet Unix header. More...

`#include <stdlib.h>`
`#include <sys/time.h>`
`#include <sys/types.h>`
`#include <sys/socket.h>`
`#include <arpa/inet.h>`
`#include <netinet/in.h>`
`#include <unistd.h>`

## Data Structures

struct | ENetBuffer

## Macros

#define | ENET_API extern
#define | ENET_CALLBACK
#define | ENET_HOST_TO_NET_16(value)
| macro that converts host to net byte-order of a 16-bit value
#define | ENET_HOST_TO_NET_32(value)
| macro that converts host to net byte-order of a 32-bit value
#define | ENET_NET_TO_HOST_16(value)
| macro that converts net to host byte-order of a 16-bit value
#define | ENET_NET_TO_HOST_32(value)
| macro that converts net to host byte-order of a 32-bit value
#define | ENET_SOCKET_NULL -1
#define | ENET_SOCKETSET_ADD(sockset, socket)
#define | ENET_SOCKETSET_CHECK(sockset, socket)
#define | ENET_SOCKETSET_EMPTY(sockset)
#define | ENET_SOCKETSET_REMOVE(sockset, socket)

## Typedefs

typedef int | ENetSocket
typedef fd_set | ENetSocketSet

## Detailed Description

ENet Unix header.

## Macro Definition Documentation

## ENET_API

#define ENET_API extern

## ENET_CALLBACK

#define ENET_CALLBACK

## ENET_HOST_TO_NET_16

#define ENET_HOST_TO_NET_16 | ( |  | value | ) |

Value:
(htons (value))

macro that converts host to net byte-order of a 16-bit value

## ENET_HOST_TO_NET_32

#define ENET_HOST_TO_NET_32 | ( |  | value | ) |

Value:
(htonl (value))

macro that converts host to net byte-order of a 32-bit value

## ENET_NET_TO_HOST_16

#define ENET_NET_TO_HOST_16 | ( |  | value | ) |

Value:
(ntohs (value))

macro that converts net to host byte-order of a 16-bit value

## ENET_NET_TO_HOST_32

#define ENET_NET_TO_HOST_32 | ( |  | value | ) |

Value:
(ntohl (value))

macro that converts net to host byte-order of a 32-bit value

## ENET_SOCKET_NULL

#define ENET_SOCKET_NULL -1

## ENET_SOCKETSET_ADD

#define ENET_SOCKETSET_ADD | ( |  | sockset,
|  |  | socket )

Value:
FD_SET (socket, & (sockset))

## ENET_SOCKETSET_CHECK

#define ENET_SOCKETSET_CHECK | ( |  | sockset,
|  |  | socket )

Value:
FD_ISSET (socket, & (sockset))

## ENET_SOCKETSET_EMPTY

#define ENET_SOCKETSET_EMPTY | ( |  | sockset | ) |

Value:
FD_ZERO (& (sockset))

## ENET_SOCKETSET_REMOVE

#define ENET_SOCKETSET_REMOVE | ( |  | sockset,
|  |  | socket )

Value:
FD_CLR (socket, & (sockset))

## Typedef Documentation

## ENetSocket

typedef int ENetSocket

## ENetSocketSet

typedef fd_set ENetSocketSet