Collage  1.0.1
Object-Oriented C++ Network Library
Public Member Functions | Public Attributes | List of all members
co::ConnectionDescription Class Reference

Describes Connection parameters. More...

#include <connectionDescription.h>

+ Inheritance diagram for co::ConnectionDescription:
+ Collaboration diagram for co::ConnectionDescription:

Public Member Functions

 ConnectionDescription ()
 Construct a new, default description. More...
 
 ConnectionDescription (std::string &data)
 Construct a description from a string representation. More...
 
CO_API void serialize (std::ostream &os) const
 Serialize this description to a std::ostream. More...
 
CO_API std::string toString () const
 
CO_API bool fromString (std::string &data)
 Read the connection description from a string. More...
 
Data Access
CO_API bool isSameMulticastGroup (ConstConnectionDescriptionPtr rhs)
 
CO_API bool operator== (const ConnectionDescription &rhs) const
 
bool operator!= (const ConnectionDescription &rhs) const
 
Deprecated Data Access
CO_API void setHostname (const std::string &hostname)
 
CO_API const std::string & getHostname () const
 
CO_API void setInterface (const std::string &interfacename)
 
CO_API const std::string & getInterface () const
 
CO_API void setFilename (const std::string &filename)
 
CO_API const std::string & getFilename () const
 

Public Attributes

ConnectionType type
 The network protocol for the connection. More...
 
int32_t bandwidth
 The bandwidth in kilobyte per second. More...
 
uint16_t port
 The listening port (TCPIP, SDP, IB, MCIP, RDMA). More...
 
std::string hostname
 The hostname to bind or connect to. More...
 
std::string interfacename
 The host name of the interface (multicast). More...
 
std::string filename
 The filename used for named pipes. More...
 

Detailed Description

Describes Connection parameters.

Definition at line 32 of file connectionDescription.h.

Constructor & Destructor Documentation

co::ConnectionDescription::ConnectionDescription ( )
inline

Construct a new, default description.

Version
1.0

Definition at line 54 of file connectionDescription.h.

co::ConnectionDescription::ConnectionDescription ( std::string &  data)

Construct a description from a string representation.

The given data is consumed, that is, the data string should be empty on return when a single description was given.

See Also
fromString()
Version
1.0

Member Function Documentation

CO_API bool co::ConnectionDescription::fromString ( std::string &  data)

Read the connection description from a string.

The string is consumed as the description is parsed. Two different formats are recognized, a human-readable and a machine-readable. The human-readable version has the format hostname[:port][:type] or filename:PIPE. The type parameter can be TCPIP, SDP, IB, MCIP, UDT or RSP. The machine-readable format contains all connection description parameters, is not documented and subject to change.

Parameters
datathe string containing the connection description.
Returns
true if the information was read correctly, false if not.
Version
1.0
bool co::ConnectionDescription::operator!= ( const ConnectionDescription rhs) const
inline
Returns
true if the two descriptions have the different values.

Definition at line 107 of file connectionDescription.h.

CO_API bool co::ConnectionDescription::operator== ( const ConnectionDescription rhs) const
Returns
true if the two descriptions have the same values.
CO_API void co::ConnectionDescription::serialize ( std::ostream &  os) const

Serialize this description to a std::ostream.

Version
1.0
CO_API std::string co::ConnectionDescription::toString ( ) const
Returns
this description as a string.
Version
1.0

Member Data Documentation

int32_t co::ConnectionDescription::bandwidth

The bandwidth in kilobyte per second.

Version
1.0

Definition at line 39 of file connectionDescription.h.

std::string co::ConnectionDescription::filename

The filename used for named pipes.

Version
1.0

Definition at line 51 of file connectionDescription.h.

std::string co::ConnectionDescription::hostname

The hostname to bind or connect to.

Version
1.0

Definition at line 45 of file connectionDescription.h.

std::string co::ConnectionDescription::interfacename

The host name of the interface (multicast).

Version
1.0

Definition at line 48 of file connectionDescription.h.

uint16_t co::ConnectionDescription::port

The listening port (TCPIP, SDP, IB, MCIP, RDMA).

Version
1.0

Definition at line 42 of file connectionDescription.h.

ConnectionType co::ConnectionDescription::type

The network protocol for the connection.

Version
1.0

Definition at line 36 of file connectionDescription.h.


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