123456789101112131415161718192021222324252627282930313233343536 |
- #ifndef __ENET_UNIX_H__
- #define __ENET_UNIX_H__
- #include <stdlib.h>
- #include <sys/types.h>
- #include <netinet/in.h>
- typedef int ENetSocket;
- enum
- {
- ENET_SOCKET_NULL = -1
- };
- #define ENET_HOST_TO_NET_16(value) (htons (value))
- #define ENET_HOST_TO_NET_32(value) (htonl (value))
- #define ENET_NET_TO_HOST_16(value) (ntohs (value))
- #define ENET_NET_TO_HOST_32(value) (ntohl (value))
- typedef struct
- {
- void * data;
- size_t dataLength;
- } ENetBuffer;
- #define ENET_CALLBACK
- #define ENET_API extern
- #endif
|