ScummVM API documentation
win32.h
1
5
#ifndef __ENET_WIN32_H__
6
#define __ENET_WIN32_H__
7
8
#ifdef _MSC_VER
9
#ifdef ENET_BUILDING_LIB
10
#pragma warning (disable: 4267) // size_t to int conversion
11
#pragma warning (disable: 4244) // 64bit to 32bit int
12
#pragma warning (disable: 4018) // signed/unsigned mismatch
13
#pragma warning (disable: 4146) // unary minus operator applied to unsigned type
14
#endif
15
#endif
16
17
#include <stdlib.h>
18
#undef WIN32_LEAN_AND_MEAN
19
#define WIN32_LEAN_AND_MEAN
20
#include <winsock2.h>
21
22
typedef
SOCKET ENetSocket;
23
24
#define ENET_SOCKET_NULL INVALID_SOCKET
25
26
#define ENET_HOST_TO_NET_16(value) (htons (value))
27
#define ENET_HOST_TO_NET_32(value) (htonl (value))
28
29
#define ENET_NET_TO_HOST_16(value) (ntohs (value))
30
#define ENET_NET_TO_HOST_32(value) (ntohl (value))
31
32
typedef
struct
33
{
34
size_t
dataLength;
35
void
* data;
36
}
ENetBuffer
;
37
38
#define ENET_CALLBACK __cdecl
39
40
#ifdef ENET_DLL
41
#ifdef ENET_BUILDING_LIB
42
#define ENET_API __declspec( dllexport )
43
#else
44
#define ENET_API __declspec( dllimport )
45
#endif
/* ENET_BUILDING_LIB */
46
#else
/* !ENET_DLL */
47
#define ENET_API extern
48
#endif
/* ENET_DLL */
49
50
typedef
fd_set ENetSocketSet;
51
52
#define ENET_SOCKETSET_EMPTY(sockset) FD_ZERO (& (sockset))
53
#define ENET_SOCKETSET_ADD(sockset, socket) FD_SET (socket, & (sockset))
54
#define ENET_SOCKETSET_REMOVE(sockset, socket) FD_CLR (socket, & (sockset))
55
#define ENET_SOCKETSET_CHECK(sockset, socket) FD_ISSET (socket, & (sockset))
56
57
#endif
/* __ENET_WIN32_H__ */
58
59
ENetBuffer
Definition:
unix.h:30
backends
networking
enet
source
win32.h
Generated on Fri Nov 15 2024 09:04:38 for ScummVM API documentation by
1.8.13