#include <XrdSysIOEvents.hh>
◆ EventType
Events that may cause a callback object to be activated.
Enumerator |
---|
ReadyToRead | New data has arrived.
|
ReadTimeOut | Read timeout.
|
ReadyToWrite | Writing won't block.
|
WriteTimeOut | Write timeout.
|
ValidEvents | Mask to test for valid events.
|
◆ CallBack()
XrdSys::IOEvents::CallBack::CallBack |
( |
| ) |
|
|
inline |
◆ ~CallBack()
virtual XrdSys::IOEvents::CallBack::~CallBack |
( |
| ) |
|
|
inlinevirtual |
◆ Event()
virtual bool XrdSys::IOEvents::CallBack::Event |
( |
Channel * |
chP, |
|
|
void * |
cbArg, |
|
|
int |
evFlags |
|
) |
| |
|
pure virtual |
Handle event notification. A method must be supplied. The enable/disable status of the channel is not modified. To change the status, use the channel's Enable() and Disable() method prior to returning. After return, the current channel's status is used to determine how it will behave. If the event is a timeout, the timeout becomes infinite for that event unless Enable() is called for the event. This is to prevent timeout loops on channels that remain enabled even after a timeout. Event loop callbacks define a hazardous programming model. If you do not have a well defined threading model, you should restrict yourself to dealing only with the passed channel object in the callback so as to avoid deadlocks.
- Parameters
-
chP | the associated channel causing the callback. |
cbArg | the callback argument specified for the channel. |
evFlags | events that caused this callback to be invoked. More than one event may be indicated (see EventType above). |
- Returns
- true Resume handling the channel with current status. false Disable the channel and remove it from associated poller.
◆ Fatal()
virtual void XrdSys::IOEvents::CallBack::Fatal |
( |
Channel * |
chP, |
|
|
void * |
cbArg, |
|
|
int |
eNum, |
|
|
const char * |
eTxt |
|
) |
| |
|
inlinevirtual |
Handle fatal error notification. This method is called only when error events are specifically enabled (see Enable() for admonitions). It is passed the reason for the error. Upon return, the channel is disabled but stays attached to the poller so that it can be revitalized with SetFD(). You should replace this method if you specifically enable error events.
- Parameters
-
chP | the associated channel causing the callback. |
cbArg | the callback argument specified for the channel. |
eNum | the errno associated with the error. |
eTxt | descriptive name of the operation encountering the error. |
◆ Stop()
virtual void XrdSys::IOEvents::CallBack::Stop |
( |
Channel * |
chP, |
|
|
void * |
cbArg |
|
) |
| |
|
inlinevirtual |
Handle poller stop notification. This method is called only when the poller is stopped and the channel enabled the stop event. You should should replace this method if you specifically enable the stop event. You must not invoke channel methods in this callback, otherwise the results are unpredictable.
- Parameters
-
chP | the associated channel causing the callback. |
cbArg | the callback argument specified for the channel. |
The documentation for this class was generated from the following file: