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

Asynchronous reader/writer with queues. More...

#include <AsyncIO.h>

Inheritance diagram for AsyncPipeQueue:
AsyncPipeThread SyncPipe SocketPipeWorker

Public Member Functions

 AsyncPipeQueue (size_t recvQueueSize=1000, size_t writeQueueSize=1000)
 
virtual void Reset ()
 
virtual void Work ()
 
void OnRead (const std::string &msg)
 
void OnRead_NoLock (const std::string &msg)
 
bool WriteAvailable () const
 Called by subclass to see whether there's a message to send.
 
std::string OnWrite ()
 Called by subclass to get the next message to send to the destination.
 
std::string OnWrite_NoLock ()
 
int MessageCount ()
 Receive functions.
 
int UnreadCount ()
 
std::string PeekNewest ()
 
std::vector< std::string > New ()
 
std::string Newest ()
 
void Send (const std::string &msg)
 Send functions.
 
int SentCount ()
 
int DeliveredCount ()
 

Public Attributes

AsyncReaderQueue reader
 
AsyncWriterQueue writer
 

Detailed Description

Asynchronous reader/writer with queues.

Member Function Documentation

void AsyncPipeQueue::OnRead ( const std::string &  msg)
inline

Interfaces that subclasses should use in Work() Called by subclass to add a message onto the queue

Referenced by SyncPipe::Start(), and AsyncReaderThread::Start().


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