YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
TcpAcceptor.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT)
3 * SPDX-License-Identifier: BSD-3-Clause
4 */
5
6#ifndef YARP_OS_IMPL_TCPACCEPTOR_H
7#define YARP_OS_IMPL_TCPACCEPTOR_H
8
9#if defined(YARP_HAS_ACE)
10# include <ace/SOCK_Acceptor.h>
11# include <ace/config.h>
12// In one the ACE headers there is a definition of "main" for WIN32
13# ifdef main
14# undef main
15# endif
16#elif defined(__unix__) || defined(__APPLE__)
18#else
19YARP_COMPILER_ERROR(Cannot implement TcpAcceptor on this platform)
20#endif
21
22namespace yarp::os::impl {
23
24#ifdef YARP_HAS_ACE
25typedef ACE_SOCK_Acceptor TcpAcceptor;
26#elif defined(__unix__) || defined(__APPLE__)
27typedef yarp::os::impl::posix::TcpAcceptor TcpAcceptor;
28#endif
29
30} // namespace yarp::os::impl
31
32#endif // YARP_OS_IMPL_TCPACCEPTOR_H
The components from which ports and connections are built.
#define YARP_COMPILER_ERROR(x)
Generate an error at build time on supported compilers.
Definition system.h:112