#include <XrdClPostMasterInterfaces.hh>
Public Types | |
| enum | Action { Take = 0x0001, Ignore = 0x0002, RemoveHandler = 0x0004, Raw = 0x0008, NoProcess = 0x0010 } |
Actions to be taken after a message is processed by the handler. More... | |
| enum | StreamEvent { Ready = 1, Broken = 2, Timeout = 3, FatalError = 4 } |
Events that may have occurred to the stream. More... | |
Public Member Functions | |
| virtual | ~IncomingMsgHandler () |
| Event types that the message handler may receive. | |
| virtual uint16_t | Examine (Message *msg)=0 |
| virtual void | Process (Message *msg) |
| virtual Status | ReadMessageBody (Message *msg, int socket, uint32_t &bytesRead) |
| virtual uint8_t | OnStreamEvent (StreamEvent event, uint16_t streamNum, Status status) |
Message handler.
Actions to be taken after a message is processed by the handler.
| virtual XrdCl::IncomingMsgHandler::~IncomingMsgHandler | ( | ) | [inline, virtual] |
Event types that the message handler may receive.
| virtual uint16_t XrdCl::IncomingMsgHandler::Examine | ( | Message * | msg | ) | [pure virtual] |
Examine an incoming message, and decide on the action to be taken
| msg | the message, may be zero if receive failed |
| virtual uint8_t XrdCl::IncomingMsgHandler::OnStreamEvent | ( | StreamEvent | event, | |
| uint16_t | streamNum, | |||
| Status | status | |||
| ) | [inline, virtual] |
Handle an event other that a message arrival
| event | type of the event | |
| streamNum | stream concerned | |
| status | status info |
| virtual void XrdCl::IncomingMsgHandler::Process | ( | Message * | msg | ) | [inline, virtual] |
Process the message if it was "taken" by the examine action
| msg | the message to be processed |
| virtual Status XrdCl::IncomingMsgHandler::ReadMessageBody | ( | Message * | msg, | |
| int | socket, | |||
| uint32_t & | bytesRead | |||
| ) | [inline, virtual] |
Read message body directly from a socket - called if Examine returns Raw flag - only socket related errors may be returned here
| msg | the corresponding message header | |
| socket | the socket to read from | |
| bytesRead | number of bytes read by the method |
References XrdCl::stOK, and XrdCl::suDone.
1.6.1