XrdCl::Channel Class Reference
A communication channel between the client and the server.
More...
#include <XrdClChannel.hh>
List of all members.
Public Member Functions |
| Channel (const URL &url, Poller *poller, TransportHandler *transport, TaskManager *taskManager, JobManager *jobManager) |
| ~Channel () |
| Destructor.
|
const URL & | GetURL () const |
| Get the URL.
|
Status | Send (Message *msg, bool stateful, time_t expires) |
Status | 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.
|
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.
|
uint16_t | NbConnectedStrm () |
| Get the number of connected data streams.
|
void | SetOnConnectHandler (Job *onConnJob) |
| Set the on-connect handler for data streams.
|
Private Attributes |
URL | pUrl |
Poller * | pPoller |
TransportHandler * | pTransport |
TaskManager * | pTaskManager |
std::vector< Stream * > | pStreams |
XrdSysMutex | pMutex |
AnyObject | pChannelData |
InQueue | pIncoming |
TickGeneratorTask * | pTickGenerator |
JobManager * | pJobManager |
Detailed Description
A communication channel between the client and the server.
Constructor & Destructor Documentation
Constructor
- Parameters:
-
| 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 |
( |
|
) |
|
Member Function Documentation
Status XrdCl::Channel::ForceDisconnect |
( |
|
) |
|
Force disconnect of all streams.
const URL& XrdCl::Channel::GetURL |
( |
|
) |
const [inline] |
uint16_t XrdCl::Channel::NbConnectedStrm |
( |
|
) |
|
Get the number of connected data streams.
Status XrdCl::Channel::QueryTransport |
( |
uint16_t |
query, |
|
|
AnyObject & |
result | |
|
) |
| | |
Query the transport handler
- Parameters:
-
| 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 |
- Returns:
- status of the query
Listen to incoming messages, the listener is notified when a new message arrives and when the timeout passes
- Parameters:
-
| handler | handler to be notified about new messages |
| expires | expiration timestamp |
- Returns:
- success when the handler has been registered correctly
Synchronously receive a message - blocks until a message matching a filter is found in the incoming queue or the timeout passes
- Parameters:
-
| 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 |
- Returns:
- success when the message has been received successfully, failure otherwise
Register channel event handler.
Remove a channel event handler.
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
- Parameters:
-
| msg | message to be sent 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 |
- Returns:
- success if the message was successfully inserted into the send queues, failure otherwise
Status 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
- Parameters:
-
| 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 |
- Returns:
- success if the message has been pushed through the wire, failure otherwise
void XrdCl::Channel::SetOnConnectHandler |
( |
Job * |
onConnJob |
) |
|
Set the on-connect handler for data streams.
void XrdCl::Channel::Tick |
( |
time_t |
now |
) |
|
Member Data Documentation
The documentation for this class was generated from the following file: