KrisLibrary  1.0.0
Public Member Functions | List of all members
TransportBase Class Reference

A base class for a transport protocol for unstructured data. More...

#include <AsyncIO.h>

Inheritance diagram for TransportBase:
SocketClientTransport SocketServerTransport StreamTransport

Public Member Functions

virtual bool Start ()
 Subclasses – can the object read?
 
virtual bool Stop ()
 
virtual bool ReadReady ()
 Subclasses – can the object read?
 
virtual bool WriteReady ()
 Subclasses – can the object write?
 
virtual const std::string * DoRead ()
 
virtual bool DoWrite (const char *msg, int length)
 
virtual bool DoWrite (const char *msg)
 
virtual bool DoWrite (const std::string &msg)
 

Detailed Description

A base class for a transport protocol for unstructured data.

Member Function Documentation

virtual const std::string* TransportBase::DoRead ( )
inlinevirtual

Subclasses – in thread, do some I/O and processing (which may block), return the payload message. If NULL is returned, there is some error and the thread quits

Reimplemented in SocketServerTransport, SocketClientTransport, and StreamTransport.

virtual bool TransportBase::DoWrite ( const char *  msg,
int  length 
)
inlinevirtual

Subclasses – in thread, do some I/O and processing (which may block) If false is returned, there is some error and the caller should quit or reopen the connection.

Reimplemented in SocketServerTransport, SocketClientTransport, and StreamTransport.

virtual bool TransportBase::DoWrite ( const char *  msg)
inlinevirtual

Subclasses – in thread, do some I/O and processing (which may block) If false is returned, there is some error and the caller should quit or reopen the connection. (Helper function – raw C strings)

References DoWrite().

Referenced by DoWrite().

virtual bool TransportBase::DoWrite ( const std::string &  msg)
inlinevirtual

Subclasses – in thread, do some I/O and processing (which may block) If false is returned, there is some error and the caller should quit or reopen the connection. (Helper function – raw strings)

References DoWrite().

Referenced by DoWrite().


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