fipa_services
Public Types | Public Member Functions | Protected Attributes | List of all members
fipa::services::transports::OutgoingConnection Class Referenceabstract

A unidirectional, outgoing connection that allows to send fipa letters to a receiver. More...

#include <OutgoingConnection.hpp>

Inheritance diagram for fipa::services::transports::OutgoingConnection:
fipa::services::transports::Connection fipa::services::transports::tcp::OutgoingConnection fipa::services::transports::udt::OutgoingConnection

Public Types

typedef boost::shared_ptr< OutgoingConnectionPtr
 

Public Member Functions

 OutgoingConnection ()
 
 OutgoingConnection (const std::string &ipaddress, uint16_t port)
 
 OutgoingConnection (const Address &address)
 
virtual ~OutgoingConnection ()
 
virtual void connect (const std::string &ipaddress, uint16_t port)=0
 
virtual void send (const std::string &data)=0
 
void setTTL (int ttl)
 
int getTTL () const
 
- Public Member Functions inherited from fipa::services::transports::Connection
 Connection ()
 
 Connection (const std::string &ip, uint16_t port, const std::string &protocol="udt")
 
 Connection (const Address &address)
 
uint16_t getPort () const
 
std::string getIP () const
 
Address getAddress () const
 
bool operator== (const Connection &other) const
 

Protected Attributes

int mTTL
 
- Protected Attributes inherited from fipa::services::transports::Connection
Address mAddress
 

Detailed Description

A unidirectional, outgoing connection that allows to send fipa letters to a receiver.

Member Typedef Documentation

◆ Ptr

Constructor & Destructor Documentation

◆ OutgoingConnection() [1/3]

fipa::services::transports::OutgoingConnection::OutgoingConnection ( )

◆ OutgoingConnection() [2/3]

fipa::services::transports::OutgoingConnection::OutgoingConnection ( const std::string &  ipaddress,
uint16_t  port 
)

◆ OutgoingConnection() [3/3]

fipa::services::transports::OutgoingConnection::OutgoingConnection ( const Address address)

◆ ~OutgoingConnection()

virtual fipa::services::transports::OutgoingConnection::~OutgoingConnection ( )
inlinevirtual

Member Function Documentation

◆ connect()

virtual void fipa::services::transports::OutgoingConnection::connect ( const std::string &  ipaddress,
uint16_t  port 
)
pure virtual

Connect to ipaddress and port

Parameters
ipaddressIP as string
portPort number
Exceptions
ifconnection cannot be established

Implemented in fipa::services::transports::udt::OutgoingConnection, and fipa::services::transports::tcp::OutgoingConnection.

◆ getTTL()

int fipa::services::transports::OutgoingConnection::getTTL ( ) const
inline

Get the Time-to-Live

◆ send()

virtual void fipa::services::transports::OutgoingConnection::send ( const std::string &  data)
pure virtual

Send data, i.e. encoded letters

Parameters
data

Implemented in fipa::services::transports::udt::OutgoingConnection, and fipa::services::transports::tcp::OutgoingConnection.

◆ setTTL()

void fipa::services::transports::OutgoingConnection::setTTL ( int  ttl)
inline

Set the Time-to-Live for message in millisec

Member Data Documentation

◆ mTTL

int fipa::services::transports::OutgoingConnection::mTTL
protected

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