YARP
Yet Another Robot Platform
TcpConnector.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2006-2020 Istituto Italiano di Tecnologia (IIT)
3  * All rights reserved.
4  *
5  * This software may be modified and distributed under the terms of the
6  * BSD-3-Clause license. See the accompanying LICENSE file for details.
7  */
8 
9 #ifndef YARP_OS_IMPL_TCPCONNECTOR_H
10 #define YARP_OS_IMPL_TCPCONNECTOR_H
11 
12 #if defined(YARP_HAS_ACE)
13 # include <ace/SOCK_Connector.h>
14 # include <ace/config.h>
15 // In one the ACE headers there is a definition of "main" for WIN32
16 # ifdef main
17 # undef main
18 # endif
19 #elif defined(__unix__)
21 #else
22 YARP_COMPILER_ERROR(Cannot implement TcpConnector on this platform)
23 #endif
24 
25 namespace yarp {
26 namespace os {
27 namespace impl {
28 
29 #ifdef YARP_HAS_ACE
30 typedef ACE_SOCK_Connector TcpConnector;
31 #elif defined(__unix__)
32 typedef yarp::os::impl::posix::TcpConnector TcpConnector;
33 #endif
34 
35 } // namespace impl
36 } // namespace os
37 } // namespace yarp
38 
39 #endif // YARP_OS_IMPL_TCPCONNECTOR_H
yarp::os::impl::posix::TcpConnector
Definition: TcpConnector.h:29
YARP_COMPILER_ERROR
#define YARP_COMPILER_ERROR(x)
Generate an error at build time on supported compilers.
Definition: system.h:113
yarp
The main, catch-all namespace for YARP.
Definition: environment.h:18
TcpConnector.h