OpenDaVINCI  4.15.3
odcore::io::Connection Class Reference

#include <Connection.h>

Inheritance diagram for odcore::io::Connection:
Inheritance graph

Public Member Functions

 Connection (const std::string &ip, const uint32_t &port)
 
virtual ~Connection ()
 
void send (odcore::data::Container &container)
 
virtual void setContainerListener (odcore::io::conference::ContainerListener *cl)
 
void setErrorListener (ConnectionErrorListener *el)
 
void start ()
 
void stop ()
 
bool isConnected ()
 

Protected Member Functions

 Connection (std::shared_ptr< odcore::io::tcp::TCPConnection > connection)
 
virtual void nextString (const std::string &s)
 
virtual void handleConnectionError ()
 

Friends

class ConnectionAcceptor
 

Constructor & Destructor Documentation

odcore::io::Connection::Connection ( const std::string &  ip,
const uint32_t &  port 
)
odcore::io::Connection::~Connection ( )
virtual
odcore::io::Connection::Connection ( std::shared_ptr< odcore::io::tcp::TCPConnection connection)
protected

Member Function Documentation

void odcore::io::Connection::handleConnectionError ( )
protectedvirtual

This method is called whenever an error occurs.

Implements odcore::io::ConnectionListener.

References odcore::io::ConnectionErrorListener::handleConnectionError().

bool odcore::io::Connection::isConnected ( )
void odcore::io::Connection::nextString ( const std::string &  s)
protectedvirtual

This method is called whenever a new string occurs.

Parameters
sString that has been occured.

Implements odcore::io::StringListener.

References odcore::io::conference::ContainerListener::nextContainer(), and odcore::data::Container::setReceivedTimeStamp().

void odcore::io::Connection::setContainerListener ( odcore::io::conference::ContainerListener cl)
virtual

This method sets or unsets a container listener.

Parameters
clContainerListener to be set. If set to NULL, observing is suspended.

Implements odcore::io::conference::ContainerObserver.

void odcore::io::Connection::setErrorListener ( ConnectionErrorListener el)
void odcore::io::Connection::start ( )
void odcore::io::Connection::stop ( )

Friends And Related Function Documentation

friend class ConnectionAcceptor
friend