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, const URL &prefurl=URL()) | |
~Channel () | |
Destructor. | |
const URL & | GetURL () const |
Get the URL. | |
XRootDStatus | Send (Message *msg, MsgHandler *handler, bool stateful, time_t expires) |
Status | QueryTransport (uint16_t query, AnyObject &result) |
void | RegisterEventHandler (ChannelEventHandler *handler) |
Register channel event handler. | |
void | RemoveEventHandler (ChannelEventHandler *handler) |
Remove a channel event handler. | |
void | Tick (time_t now) |
Handle a time event. | |
Status | ForceDisconnect () |
Force disconnect of all streams. | |
Status | ForceReconnect () |
Force reconnect. | |
uint16_t | NbConnectedStrm () |
Get the number of connected data streams. | |
void | SetOnDataConnectHandler (std::shared_ptr< Job > &onConnJob) |
Set the on-connect handler for data streams. | |
bool | CanCollapse (const URL &url) |
void | DecFileInstCnt () |
Decrement file object instance count bound to this channel. | |
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, | ||
const URL & | prefurl = URL() |
||
) |
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.
bool XrdCl::Channel::CanCollapse | ( | const URL & | url | ) |
void XrdCl::Channel::DecFileInstCnt | ( | ) |
Decrement file object instance count bound to this channel.
Status XrdCl::Channel::ForceDisconnect | ( | ) |
Force disconnect of all streams.
Status XrdCl::Channel::ForceReconnect | ( | ) |
Force reconnect.
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 |
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, |
MsgHandler * | 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 |
handler | handler to be notified about the status |
stateful | physical stream disconnection causes an error |
expires | unix timestamp after which a failure is reported to the listener |
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 |