omegalib  13.1
omega::MissionControlConnection Class Reference

#include <MissionControl.h>

Public Member Functions

 MissionControlConnection (ConnectionInfo ci, IMissionControlMessageHandler *msgHandler, MissionControlServer *server)
 
virtual ~MissionControlConnection ()
 
virtual void handleData ()
 
virtual void handleClosed ()
 
virtual void handleConnected ()
 Connection events. More...
 
virtual void handleError (const ConnectionError &err)
 
void sendMessage (const char *header, void *data, size_t size)
 
void goodbyeServer ()
 Client side: tells the server we are done talking and waits for graceful close. More...
 
String getName ()
 
virtual void setName (const String &name)
 
bool isLogForwardingEnabled ()
 
void setLogForwardingEnabled (bool value)
 
- Public Member Functions inherited from omicron::TcpConnection
 TcpConnection (const ConnectionInfo &ci)
 
virtual ~TcpConnection ()
 
void handle_connect (const asio::error_code &error)
 
tcp::socket & getSocket ()
 Connection properties. More...
 
ConnectionState getState ()
 Gets the connection state. More...
 
const ConnectionInfo & getConnectionInfo ()
 Gets the connection info object. More...
 
bool poll ()
 Connection management. More...
 
void close ()
 Forces a connection close. More...
 
void waitClose ()
 Waits for the other end to close the connection. More...
 
void open (const String &host, int port)
 Opens a connection to a server. More...
 
void write (const String &data)
 Data IO Note: all the write methods are blocking: they return only when the data has been fully written to the internal buffers. More...
 
void write (void *data, size_t size)
 Writes a buffer to the connection stream. More...
 
size_t readUntil (void *buffer, size_t size, char delimiter= '\0')
 Synchronously read byte data until the specified delimiter is found or the buffer fills up. More...
 
size_t read (void *buffer, size_t size)
 Synchronously read thre specified number of bytes from the stream. More...
 
size_t availableBytes ()
 Returns the number of bytes available to be read. More...
 
- Public Member Functions inherited from omicron::ReferenceType
 ReferenceType ()
 
virtual ~ReferenceType ()
 
void ref ()
 
void unref ()
 
long refCount ()
 

Additional Inherited Members

- Public Types inherited from omicron::TcpConnection
enum  ConnectionState { ConnectionListening, ConnectionOpen, ConnectionClosed }
 
- Static Public Member Functions inherited from omicron::ReferenceType
static void printObjCounts ()
 
- Protected Member Functions inherited from omicron::TcpConnection
void doHandleConnected ()
 
- Protected Attributes inherited from omicron::TcpConnection
String myHost
 
int myPort
 
ConnectionInfo myConnectionInfo
 
ConnectionState myState
 
tcp::socket mySocket
 
asio::streambuf myInputBuffer
 
- Static Protected Attributes inherited from omicron::ReferenceType
static List< ReferenceType * > mysObjList
 
+ Inheritance diagram for omega::MissionControlConnection:

Constructor & Destructor Documentation

omega::MissionControlConnection::MissionControlConnection ( ConnectionInfo  ci,
IMissionControlMessageHandler *  msgHandler,
MissionControlServer *  server 
)
virtual omega::MissionControlConnection::~MissionControlConnection ( )
virtual

Member Function Documentation

String omega::MissionControlConnection::getName ( )
inline
void omega::MissionControlConnection::goodbyeServer ( )

Client side: tells the server we are done talking and waits for graceful close.

virtual void omega::MissionControlConnection::handleClosed ( )
virtual

Reimplemented from omicron::TcpConnection.

virtual void omega::MissionControlConnection::handleConnected ( )
virtual

Connection events.

Reimplemented from omicron::TcpConnection.

virtual void omega::MissionControlConnection::handleData ( )
virtual

Reimplemented from omicron::TcpConnection.

virtual void omega::MissionControlConnection::handleError ( const ConnectionError &  err)
virtual

Reimplemented from omicron::TcpConnection.

bool omega::MissionControlConnection::isLogForwardingEnabled ( )
inline
void omega::MissionControlConnection::sendMessage ( const char *  header,
void *  data,
size_t  size 
)
void omega::MissionControlConnection::setLogForwardingEnabled ( bool  value)
virtual void omega::MissionControlConnection::setName ( const String &  name)
virtual

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