VSM C++ SDK
Vehicle Specific Modules SDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
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 _UGCS_VSM_SOCKETS_H_
12 #define _UGCS_VSM_SOCKETS_H_
13 
14 #include <ugcs/vsm/platform_sockets.h>
15 
16 namespace ugcs {
17 namespace vsm {
18 namespace sockets {
19 
20 // These two calls are for WSAStartup and friends. Nop in unix world.
21 void
22 Init_sockets();
23 void
24 Done_sockets();
25 
26 int
27 Create_socketpair(Socket_handle&, Socket_handle&);
28 
29 int
30 Close_socket(Socket_handle);
31 
32 bool
33 Is_last_operation_pending();
34 
35 int
36 Make_nonblocking(Socket_handle);
37 
38 int
39 Disable_sigpipe(Socket_handle);
40 
41 int
42 Prepare_for_listen(Socket_handle, bool is_multicast);
43 
44 } // namespace sockets
45 } // namespace vsm
46 } // namespace ugcs
47 
48 #endif /* _UGCS_VSM_SOCKETS_H_ */