SLikeNet 0.1.3

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SocketDefines.h
Go to the documentation of this file.
1 /*
2 * Original work: Copyright (c) 2014, Oculus VR, Inc.
3 * All rights reserved.
4 *
5 * This source code is licensed under the BSD-style license found in the
6 * RakNet License.txt file in the licenses directory of this source tree. An additional grant
7 * of patent rights can be found in the RakNet Patents.txt file in the same directory.
8 *
9 *
10 * Modified work: Copyright (c) 2016-2017, SLikeSoft UG (haftungsbeschränkt)
11 *
12 * This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style
13 * license found in the license.txt file in the root directory of this source tree.
14 */
15
16 #ifndef __SOCKET_DEFINES_H
17 #define __SOCKET_DEFINES_H
18
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55 #if defined(WINDOWS_STORE_RT)
56 #include "WinRTSocketAdapter.h"
57 #define accept__ WinRTAccept
58 #define connect__ WinRTConnect
59 #define closesocket__ WinRTClose
60 #define socket__ WinRTCreateDatagramSocket
61 #define bind__ WinRTBind
62 #define getsockname__ RNS2_WindowsStore8::WinRTGetSockName
63 #define getsockopt__ WinRTGetSockOpt
64 #define ioctlsocket__ RNS2_WindowsStore8::WinRTIOCTLSocket
65 #define listen__ WinRTListen
66 #define recv__ WinRTRecv
67 #define recvfrom__ WinRTRecvFrom
68 #define select__ WinRTSelect
69 #define send__ WinRTSend
70 #define sendto__ WinRTSendTo
71 #define setsockopt__ RNS2_WindowsStore8::WinRTSetSockOpt
72 #define shutdown__ WinRTShutdown
73 #define WSASendTo__ WinRTSendTo
74 #else
75
76
77
78
79
80
81 #if defined(_WIN32)
82 #define closesocket__ closesocket
83 #define select__ select
84 #elif defined(__native_client__)
85 // namespace SLNet { void CloseSocket(SOCKET s); }
86 // #define closesocket__ SLNet::CloseSocket
87 #define select__ select
88 #else
89 #define closesocket__ close
90 #define select__ select
91 #endif
92 #define accept__ accept
93 #define connect__ connect
94
95
96
97 #define socket__ socket
98
99 #define bind__ bind
100 #define getsockname__ getsockname
101 #define getsockopt__ getsockopt
102
103
104
105 #define ioctlsocket__ ioctlsocket
106 #define listen__ listen
107 #define recv__ recv
108 #define recvfrom__ recvfrom
109
110
111
112 #define sendto__ sendto
113
114 #define send__ send
115
116
117
118 #define setsockopt__ setsockopt
119
120 #define shutdown__ shutdown
121 #define WSASendTo__ WSASendTo
122 #endif
123
124 #endif