KrisLibrary
1.0.0
|
Asynchronous reader/writer with queues. More...
#include <AsyncIO.h>
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 |
Asynchronous reader/writer with queues.
|
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().