Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/merger/src/enet/unix.h @ 287

Last change on this file since 287 was 278, checked in by nicolasc, 17 years ago

merged network

File size: 859 bytes
Line 
1/**
2 @file  unix.h
3 @brief ENet Unix header
4*/
5#ifndef __ENET_UNIX_H__
6#define __ENET_UNIX_H__
7
8#include <stdlib.h>
9#include <sys/types.h>
10#include <netinet/in.h>
11
12typedef int ENetSocket;
13
14enum
15{
16    ENET_SOCKET_NULL = -1
17};
18
19#define ENET_HOST_TO_NET_16(value) (htons (value)) /**< macro that converts host to net byte-order of a 16-bit value */
20#define ENET_HOST_TO_NET_32(value) (htonl (value)) /**< macro that converts host to net byte-order of a 32-bit value */
21
22#define ENET_NET_TO_HOST_16(value) (ntohs (value)) /**< macro that converts net to host byte-order of a 16-bit value */
23#define ENET_NET_TO_HOST_32(value) (ntohl (value)) /**< macro that converts net to host byte-order of a 32-bit value */
24
25typedef struct
26{
27    void * data;
28    size_t dataLength;
29} ENetBuffer;
30
31#define ENET_CALLBACK
32
33#define ENET_API extern
34
35#endif /* __ENET_UNIX_H__ */
36
Note: See TracBrowser for help on using the repository browser.