|
xrootd
|
A communication channel between the client and the server. More...
#include <XrdClChannel.hh>

Public Member Functions | |
| Channel (const URL &url, Poller *poller, TransportHandler *transport, TaskManager *taskManager, JobManager *jobManager) | |
| ~Channel () | |
| Destructor. More... | |
| const URL & | GetURL () const |
| Get the URL. More... | |
| XRootDStatus | Send (Message *msg, bool stateful, time_t expires) |
| XRootDStatus | Send (Message *msg, OutgoingMsgHandler *handler, bool stateful, time_t expires) |
| Status | Receive (Message *&msg, MessageFilter *filter, time_t expires) |
| Status | Receive (IncomingMsgHandler *handler, time_t expires) |
| Status | QueryTransport (uint16_t query, AnyObject &result) |
| void | RegisterEventHandler (ChannelEventHandler *handler) |
| Register channel event handler. More... | |
| void | RemoveEventHandler (ChannelEventHandler *handler) |
| Remove a channel event handler. More... | |
| void | Tick (time_t now) |
| Handle a time event. More... | |
| Status | ForceDisconnect () |
| Force disconnect of all streams. More... | |
| uint16_t | NbConnectedStrm () |
| Get the number of connected data streams. More... | |
| void | SetOnDataConnectHandler (std::shared_ptr< Job > &onConnJob) |
| Set the on-connect handler for data streams. More... | |
Private Attributes | |
| URL | pUrl |
| Poller * | pPoller |
| TransportHandler * | pTransport |
| TaskManager * | pTaskManager |
| Stream * | pStream |
| XrdSysMutex | pMutex |
| AnyObject | pChannelData |
| InQueue | pIncoming |
| TickGeneratorTask * | pTickGenerator |
| JobManager * | pJobManager |
A communication channel between the client and the server.
| XrdCl::Channel::Channel | ( | const URL & | url, |
| Poller * | poller, | ||
| TransportHandler * | transport, | ||
| TaskManager * | taskManager, | ||
| JobManager * | jobManager | ||
| ) |
Constructor
| url | address of the server to connect to |
| poller | poller object to be used for non-blocking IO |
| transport | protocol specific transport handler |
| taskManager | async task handler to be used by the channel |
| jobManager | worker thread handler to be used by the channel |
| XrdCl::Channel::~Channel | ( | ) |
Destructor.
| Status XrdCl::Channel::ForceDisconnect | ( | ) |
Force disconnect of all streams.
| uint16_t XrdCl::Channel::NbConnectedStrm | ( | ) |
Get the number of connected data streams.
Query the transport handler
| query | the query as defined in the TransportQuery struct or others that may be recognized by the protocol transport |
| result | the result of the query |
| Status XrdCl::Channel::Receive | ( | IncomingMsgHandler * | handler, |
| time_t | expires | ||
| ) |
Listen to incoming messages, the listener is notified when a new message arrives and when the timeout passes
| handler | handler to be notified about new messages |
| expires | expiration timestamp |
| Status XrdCl::Channel::Receive | ( | Message *& | msg, |
| MessageFilter * | filter, | ||
| time_t | expires | ||
| ) |
Synchronously receive a message - blocks until a message matching a filter is found in the incoming queue or the timeout passes
| msg | reference to a message pointer, the pointer will point to the received message |
| filter | filter object defining what to look for |
| expires | expiration timestamp |
| void XrdCl::Channel::RegisterEventHandler | ( | ChannelEventHandler * | handler | ) |
Register channel event handler.
| void XrdCl::Channel::RemoveEventHandler | ( | ChannelEventHandler * | handler | ) |
Remove a channel event handler.
| XRootDStatus XrdCl::Channel::Send | ( | Message * | msg, |
| bool | stateful, | ||
| time_t | expires | ||
| ) |
Send a message synchronously - synchronously means that it will block until the message is written to a socket
| msg | message to be sent |
| expires | expiration timestamp after which a failure should be reported if sending was unsuccessful |
| stateful | physical stream disconnection causes an error |
| XRootDStatus XrdCl::Channel::Send | ( | Message * | msg, |
| OutgoingMsgHandler * | handler, | ||
| bool | stateful, | ||
| time_t | expires | ||
| ) |
Send the message asynchronously - the message is inserted into the send queue and a listener is called when the message is successfully pushed through the wire or when the timeout elapses
| msg | message to be sent @apram stateful physical stream disconnection causes an error |
| expires | unix timestamp after which a failure is reported to the listener |
| handler | handler to be notified about the status |
| redirector | virtual redirector to be used |
| void XrdCl::Channel::SetOnDataConnectHandler | ( | std::shared_ptr< Job > & | onConnJob | ) |
Set the on-connect handler for data streams.
| void XrdCl::Channel::Tick | ( | time_t | now | ) |
Handle a time event.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |