MCSB  2.0.0
High-throughput shared memory middleware
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros
Public Member Functions | List of all members
MCSB::ClientWatcher Class Reference

A simple watcher class for using an MCSB Client with libev. More...

#include <MCSB/ClientWatcher.h>

Public Member Functions

 ClientWatcher (Client &client, ev::loop_ref loop=0, float period=1.)
 

Detailed Description

A simple watcher class for using an MCSB Client with libev.

A ClientWatcher watches a Client and calls Client::Poll() as needed. If the Client is connected, ClientWatcher will watch its file descriptor and call Poll whenever it is readable. If the Client is not connected, ClientWatcher will periodically call Poll, which will attempt to reconnect the Client to the Manager.

Constructor & Destructor Documentation

MCSB::ClientWatcher::ClientWatcher ( Client client,
ev::loop_ref  loop = 0,
float  period = 1. 
)
Parameters
clientThe MCSB Client to be watched and serviced.
loopThe libev event loop in use (where 0 is default_loop).
periodWaiting period to try reconnecting when disconnected.

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