YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
yarp::os::impl::TcpFace Class Reference

Communicating with a port via TCP. More...

#include <yarp/os/impl/TcpFace.h>

+ Inheritance diagram for yarp::os::impl::TcpFace:

Public Member Functions

 TcpFace ()
 
 ~TcpFace () override
 
bool open (const Contact &address) override
 Start listening to the given address.
 
void close () override
 Stop listening.
 
InputProtocolread () override
 return nullptr on failure.
 
OutputProtocolwrite (const Contact &address) override
 Try to reach out and talk to someone.
 
Contact getLocalAddress () const override
 Get address after open(), if more specific that the address provided to open() - otherwise an invalid address is returned.
 
- Public Member Functions inherited from yarp::os::Face
 Face ()=default
 Constructor.
 
virtual ~Face ()=default
 Destructor.
 

Protected Attributes

yarp::os::impl::AuthHMAC auth
 

Detailed Description

Communicating with a port via TCP.

Definition at line 21 of file TcpFace.h.

Constructor & Destructor Documentation

◆ TcpFace()

TcpFace::TcpFace ( )
default

◆ ~TcpFace()

TcpFace::~TcpFace ( )
override

Definition at line 27 of file TcpFace.cpp.

Member Function Documentation

◆ close()

void TcpFace::close ( )
overridevirtual

Stop listening.

Implements yarp::os::Face.

Definition at line 63 of file TcpFace.cpp.

◆ getLocalAddress()

Contact TcpFace::getLocalAddress ( ) const
overridevirtual

Get address after open(), if more specific that the address provided to open() - otherwise an invalid address is returned.

Returns
an address

Reimplemented from yarp::os::Face.

Definition at line 148 of file TcpFace.cpp.

◆ open()

bool TcpFace::open ( const Contact address)
overridevirtual

Start listening to the given address.

Parameters
addressthe parameters needed for listening. E.g. for TCP, this would contain a socket number.
Returns
true on success.

Implements yarp::os::Face.

Definition at line 33 of file TcpFace.cpp.

◆ read()

InputProtocol * TcpFace::read ( )
overridevirtual

return nullptr on failure.

No exceptions thrown.

Implements yarp::os::Face.

Definition at line 90 of file TcpFace.cpp.

◆ write()

OutputProtocol * TcpFace::write ( const Contact address)
overridevirtual

Try to reach out and talk to someone.

Parameters
addressparameters describing destination. For example, for TCP this would contain a machine name/IP address, and a socket number.
Returns
a protocol object to talk with, or nullptr on failure.

Implements yarp::os::Face.

Definition at line 120 of file TcpFace.cpp.

Member Data Documentation

◆ auth

yarp::os::impl::AuthHMAC yarp::os::impl::TcpFace::auth
protected

Definition at line 41 of file TcpFace.h.


The documentation for this class was generated from the following files: