YARP
Yet Another Robot Platform
TcpFace.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT)
3 * SPDX-FileCopyrightText: 2006-2010 RobotCub Consortium
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7#ifndef YARP_OS_IMPL_TCPFACE_H
8#define YARP_OS_IMPL_TCPFACE_H
9
10#include <yarp/conf/system.h>
11
12#include <yarp/os/Face.h>
15
16namespace yarp::os::impl {
17
22{
23public:
25
26 ~TcpFace() override;
27
28 bool open(const Contact& address) override;
29 void close() override;
30 InputProtocol* read() override;
31 OutputProtocol* write(const Contact& address) override;
32
33 Contact getLocalAddress() const override;
34
35 /*
36 * This class like all classes except the port objects does
37 * not have any notion of running in a multi-threaded environment.
38 */
39
40protected:
42
43private:
44 void closeFace();
45 Contact address;
46 yarp::os::impl::TcpAcceptor peerAcceptor;
47};
48
49
50} // namespace yarp::os::impl
51
52#endif // YARP_OS_IMPL_TCPFACE_H
Represents how to reach a part of a YARP network.
Definition: Contact.h:33
The initial point-of-contact with a port.
Definition: Face.h:20
The input side of an active connection between two ports.
Definition: InputProtocol.h:32
The output side of an active connection between two ports.
3-way authentication via HMAC
Definition: AuthHMAC.h:29
Communicating with a port via TCP.
Definition: TcpFace.h:22
yarp::os::impl::AuthHMAC auth
Definition: TcpFace.h:41
The components from which ports and connections are built.
bool read(ImageOf< PixelRgb > &dest, const std::string &src, image_fileformat format=FORMAT_ANY)
Definition: ImageFile.cpp:915
bool write(const ImageOf< PixelRgb > &src, const std::string &dest, image_fileformat format=FORMAT_PPM)
Definition: ImageFile.cpp:1091
#define YARP_os_impl_API
Definition: api.h:46