21 #ifndef G_NET_FUTURE_EVENT__H
22 #define G_NET_FUTURE_EVENT__H
31 class FutureEventHandler ;
32 class FutureEventImp ;
65 G_EXCEPTION( Error ,
"FutureEvent error" ) ;
66 typedef HANDLE handle_type ;
78 static bool send( handle_type handle ) g__noexcept ;
94 unique_ptr<FutureEventImp> m_imp ;
A callback interface for GNet::FutureEvent.
An object that hooks into the event loop and calls back to the client code.
~FutureEvent()
Destructor.
An abstract interface for handling exceptions thrown out of event-loop callbacks (socket events...
FutureEvent(FutureEventHandler &, ExceptionHandler &)
Constructor. Installs itself in the event loop.
virtual ~FutureEventHandler()
Destructor.
A pimple-pattern implementation class used by GNet::FutureEvent.
static bool send(handle_type handle) g__noexcept
Pokes an event into the main event loop so that the FutureEventHandler callback is called asynchronou...
virtual void onFutureEvent()=0
Callback function that delivers the future event.
handle_type handle()
Returns a handle that can be passed between threads and used in send().