VSM C++ SDK
Vehicle Specific Modules SDK
win/ugcs/vsm/platform_sockets.h
1 // Copyright (c) 2014, Smart Projects Holdings Ltd
2 // All rights reserved.
3 // See LICENSE file for license details.
4 
5 /*
6  * platform_sockets.h
7  *
8  * Defines platform specific parts of socket implementation.
9  */
10 
11 #ifndef _WIN32
12 #error "This header should be included only in Windows build."
13 #endif
14 
15 #ifndef PLATFORM_SOCKETS_H_
16 #define PLATFORM_SOCKETS_H_
17 
18 // Windows specific headers for socket stuff
19 #include <winsock2.h>
20 #include <ws2tcpip.h> // for socklen_t
21 /* Some weird code can define these macros in Windows headers. */
22 #ifdef ERROR
23 #undef ERROR
24 #endif
25 #ifdef interface
26 #undef interface
27 #endif
28 #ifdef RELATIVE
29 #undef RELATIVE
30 #endif
31 #ifdef ABSOLUTE
32 #undef ABSOLUTE
33 #endif
34 
35 
36 namespace ugcs
37 {
38 namespace vsm
39 {
40 namespace sockets
41 {
42 
43 // Windows specific socket handle
44 typedef SOCKET Socket_handle; /* Win */
45 
46 // Only linux build sets SEND_FLAGS to nonzero.
47 const int SEND_FLAGS = 0;
48 
49 }// namespace platform
50 }
51 }
52 
53 #endif /* PLATFORM_SOCKETS_H_ */
UGCS root namespace.
Definition: android-linux/ugcs/vsm/platform_sockets.h:27