VSM C++ SDK
Vehicle Specific Modules SDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
mac/ugcs/vsm/platform_sockets.h
1 // Copyright (c) 2018, 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 __APPLE__
12 #error "This header should be included only in macos build."
13 #endif
14 
15 #ifndef PLATFORM_SOCKETS_H_
16 #define PLATFORM_SOCKETS_H_
17 
18 
19 #include <sys/select.h>
20 #include <sys/socket.h>
21 #include <arpa/inet.h> // inet_ntoa
22 #include <netdb.h> // addrinfo
23 #define INVALID_SOCKET (-1)
24 #define SOCKET_ERROR (-1)
25 
26 namespace ugcs
27 {
28 namespace vsm
29 {
30 namespace sockets
31 {
32 
33 // Unix specific socket handle
34 typedef int Socket_handle;
35 
36 // Only linux build sets SEND_FLAGS to nonzero.
37 const int SEND_FLAGS = 0;
38 
39 }// namespace platform
40 }
41 }
42 
43 #endif /* PLATFORM_SOCKETS_H_ */