Orxonox
0.0.5 Codename: Arcturus
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
external
enet
unix.h
Go to the documentation of this file.
1
5
#ifndef __ENET_UNIX_H__
6
#define __ENET_UNIX_H__
7
8
#include <stdlib.h>
9
#include <sys/time.h>
10
#include <sys/types.h>
11
#include <netinet/in.h>
12
#include <unistd.h>
13
14
typedef
int
ENetSocket
;
15
16
enum
17
{
18
ENET_SOCKET_NULL
= -1
19
};
20
21
#define ENET_HOST_TO_NET_16(value) (htons (value))
22
#define ENET_HOST_TO_NET_32(value) (htonl (value))
24
#define ENET_NET_TO_HOST_16(value) (ntohs (value))
25
#define ENET_NET_TO_HOST_32(value) (ntohl (value))
27
typedef struct
28
{
29
void
*
data
;
30
size_t
dataLength
;
31
}
ENetBuffer
;
32
33
#define ENET_CALLBACK
34
35
#define ENET_API extern
36
37
typedef
fd_set
ENetSocketSet
;
38
39
#define ENET_SOCKETSET_EMPTY(sockset) FD_ZERO (& (sockset))
40
#define ENET_SOCKETSET_ADD(sockset, socket) FD_SET (socket, & (sockset))
41
#define ENET_SOCKETSET_REMOVE(sockset, socket) FD_CLEAR (socket, & (sockset))
42
#define ENET_SOCKETSET_CHECK(sockset, socket) FD_ISSET (socket, & (sockset))
43
44
#endif
/* __ENET_UNIX_H__ */
45
ENET_SOCKET_NULL
Definition:
unix.h:18
ENetBuffer::data
void * data
Definition:
unix.h:29
ENetSocket
int ENetSocket
Definition:
unix.h:14
ENetBuffer
Definition:
unix.h:27
ENetSocketSet
fd_set ENetSocketSet
Definition:
unix.h:37
ENetBuffer::dataLength
size_t dataLength
Definition:
unix.h:30
Generated on Fri Apr 12 2019 01:25:40 for Orxonox by
1.8.11