#include <tunnel.h>
Public Member Functions | |
virtual | ~Tunnel () |
virtual void | send (Callback *cb, bool sync=false)=0 |
virtual bool | in_sync_callback ()=0 |
virtual void | drain ()=0 |
Classes | |
class | Callback |
Tunnel callback. More... |
A tunnel is a device that accepts callbacks to be executed, either synchronous or asynchronous.
virtual SigCX::Tunnel::~Tunnel | ( | ) | [inline, virtual] |
Destructor.
virtual void SigCX::Tunnel::send | ( | Callback * | cb, | |
bool | sync = false | |||
) | [pure virtual] |
Send a callback to the other side.
cb | Callback to be executed on the other side of the tunnel. | |
sync | If true, this thread is suspended until the callback has finished execution. |
virtual bool SigCX::Tunnel::in_sync_callback | ( | ) | [pure virtual] |
Check if tunnel is executing a synchronous callback.
true
if a synchronous callback is in execution. Implemented in SigCX::ThreadTunnel.
virtual void SigCX::Tunnel::drain | ( | ) | [pure virtual] |
Drain the tunnel.
Any callbacks in the tunnel are cancelled. This is intended to be called at the destination end of the tunnel.
Implemented in SigCX::ThreadTunnel.