fipa_services
Public Member Functions | List of all members
fipa::services::transports::udt::OutgoingConnection Class Reference

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

#include <OutgoingConnection.hpp>

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

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)
 
void sendData (const std::string &data, int ttl=-1, bool inorder=true) const
 
virtual void send (const std::string &data)
 
- Public Member Functions inherited from fipa::services::transports::OutgoingConnection
 OutgoingConnection ()
 
 OutgoingConnection (const std::string &ipaddress, uint16_t port)
 
 OutgoingConnection (const Address &address)
 
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
 

Additional Inherited Members

- Public Types inherited from fipa::services::transports::OutgoingConnection
typedef boost::shared_ptr< OutgoingConnectionPtr
 
- Protected Attributes inherited from fipa::services::transports::OutgoingConnection
int mTTL
 
- Protected Attributes inherited from fipa::services::transports::Connection
Address mAddress
 

Detailed Description

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

Constructor & Destructor Documentation

◆ OutgoingConnection() [1/3]

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

◆ OutgoingConnection() [2/3]

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

◆ OutgoingConnection() [3/3]

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

◆ ~OutgoingConnection()

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

Member Function Documentation

◆ connect()

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

Connect to ipaddress and port

Parameters
ipaddressIP as string
portPort number
Exceptions
ifconnection cannot be established

Implements fipa::services::transports::OutgoingConnection.

◆ send()

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

Send data via this connection

Exceptions
std::runtime_errorif transport failed

Implements fipa::services::transports::OutgoingConnection.

◆ sendData()

void fipa::services::transports::udt::OutgoingConnection::sendData ( const std::string &  data,
int  ttl = -1,
bool  inorder = true 
) const

Send message

Parameters
datastring as data container
ttlTime to live for this message, default is unlimited
inorderSet to true if message you be received only in the right order

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