YARP
Yet Another Robot Platform
TcpStream.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_TCPSTREAM_H
7#define YARP_OS_IMPL_TCPSTREAM_H
8
9#if defined(YARP_HAS_ACE)
10# include <ace/SOCK_Stream.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__)
18#else
19YARP_COMPILER_ERROR(Cannot implement TcpStream on this platform)
20#endif
21
22namespace yarp::os::impl {
23
24#ifdef YARP_HAS_ACE
25typedef ACE_SOCK_Stream TcpStream;
26#elif defined(__unix__)
27typedef yarp::os::impl::posix::TcpStream TcpStream;
28#endif
29
30} // namespace yarp::os::impl
31
32#endif // YARP_OS_IMPL_TCPSTREAM_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