YARP
Yet Another Robot Platform
TcpFace.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2006-2020 Istituto Italiano di Tecnologia (IIT)
3  * Copyright (C) 2006-2010 RobotCub Consortium
4  * All rights reserved.
5  *
6  * This software may be modified and distributed under the terms of the
7  * BSD-3-Clause license. See the accompanying LICENSE file for details.
8  */
9 
10 #ifndef YARP_OS_IMPL_TCPFACE_H
11 #define YARP_OS_IMPL_TCPFACE_H
12 
13 #include <yarp/conf/system.h>
14 
15 #include <yarp/os/Face.h>
16 #include <yarp/os/impl/AuthHMAC.h>
18 
19 namespace yarp {
20 namespace os {
21 namespace impl {
22 
27 {
28 public:
30 
31  ~TcpFace() override;
32 
33  bool open(const Contact& address) override;
34  void close() override;
35  InputProtocol* read() override;
36  OutputProtocol* write(const Contact& address) override;
37 
38  Contact getLocalAddress() const override;
39 
40  /*
41  * This class like all classes except the port objects does
42  * not have any notion of running in a multi-threaded environment.
43  */
44 
45 protected:
47 
48 private:
49  void closeFace();
50  Contact address;
51  yarp::os::impl::TcpAcceptor peerAcceptor;
52 };
53 
54 
55 } // namespace impl
56 } // namespace os
57 } // namespace yarp
58 
59 #endif // YARP_OS_IMPL_TCPFACE_H
yarp::os::impl::TcpFace::auth
yarp::os::impl::AuthHMAC auth
Definition: TcpFace.h:46
yarp::sig::file::read
bool read(ImageOf< PixelRgb > &dest, const std::string &src, image_fileformat format=FORMAT_ANY)
Definition: ImageFile.cpp:827
yarp::os::OutputProtocol
The output side of an active connection between two ports.
Definition: OutputProtocol.h:33
Face.h
yarp::os::impl::TcpFace
Communicating with a port via TCP.
Definition: TcpFace.h:27
AuthHMAC.h
TcpAcceptor.h
system.h
yarp
The main, catch-all namespace for YARP.
Definition: environment.h:18
YARP_os_impl_API
#define YARP_os_impl_API
Definition: api.h:45
yarp::os::Contact
Represents how to reach a part of a YARP network.
Definition: Contact.h:39
yarp::os::impl::TcpFace::TcpFace
TcpFace()
yarp::os::InputProtocol
The input side of an active connection between two ports.
Definition: InputProtocol.h:38
yarp::sig::file::write
bool write(const ImageOf< PixelRgb > &src, const std::string &dest, image_fileformat format=FORMAT_PPM)
Definition: ImageFile.cpp:971
yarp::os::Face
The initial point-of-contact with a port.
Definition: Face.h:24
yarp::os::impl::AuthHMAC
3-way authentication via HMAC
Definition: AuthHMAC.h:34