![]() |
XRootD
|
#include <XrdTpcPMarkManager.hh>
Classes | |
class | SocketInfo |
Public Member Functions | |
PMarkManager (XrdHttpExtReq &req) | |
virtual | ~PMarkManager ()=default |
void | beginPMarks () |
bool | connect (int fd, const struct sockaddr *sockP, size_t sockPLen, uint32_t timeout_sec, std::stringstream &err) |
void | endPmark (int fd) |
bool | isEnabled () const |
void | startTransfer () |
Definition at line 48 of file XrdTpcPMarkManager.hh.
XrdTpc::PMarkManager::PMarkManager | ( | XrdHttpExtReq & | req | ) |
Definition at line 34 of file XrdTpcPMarkManager.cc.
|
virtualdefault |
void XrdTpc::PMarkManager::beginPMarks | ( | ) |
Creates the different packet marking handles allowing to mark the transfer packets
Call this after the curl_multi_perform() has been called.
Definition at line 65 of file XrdTpcPMarkManager.cc.
References XrdSecEntity::addrInfo, XrdNetPMark::Begin(), XrdTpc::PMarkManager::SocketInfo::client, XrdHttpExtReq::mSciTag, XrdHttpExtReq::resource, and XrdNetAddrInfo::SockFD().
bool XrdTpc::PMarkManager::connect | ( | int | fd, |
const struct sockaddr * | sockP, | ||
size_t | sockPLen, | ||
uint32_t | timeout_sec, | ||
std::stringstream & | err | ||
) |
Will connect the socket attached to the file descriptor within a certain timeout and add the file descriptor to the. packet marking manager so packet marking can be done achieved later on If pmark is not enabled, this function will just return true without trying to connect (libcurl will perform the connection). False will be returned in case the connection could not have been done.
fd | the fd associated to the socket |
sockP | the connection information |
sockPLen | the length of the connection information |
timeout_sec | the timeout after which the connection is considered failed |
err | the error stream allowing to understand from where the issue comes from |
Definition at line 43 of file XrdTpcPMarkManager.cc.
References XrdNetUtils::ConnectWithTimeout(), and isEnabled().
void XrdTpc::PMarkManager::endPmark | ( | int | fd | ) |
This function deletes the PMark handle associated to the fd passed in parameter Use this before closing the associated socket! Otherwise the information contained in the firefly (e.g sent bytes or received bytes) will have values equal to 0.
fd | the fd of the socket to be closed |
Definition at line 98 of file XrdTpcPMarkManager.cc.
bool XrdTpc::PMarkManager::isEnabled | ( | ) | const |
Definition at line 57 of file XrdTpcPMarkManager.cc.
References XrdHttpExtReq::mSciTag.
Referenced by connect().
void XrdTpc::PMarkManager::startTransfer | ( | ) |
Calling this function will indicate that the connections that will happen will be related to the data transfer. The addFd(...) function will then register any socket that is created after this function will be called.
Definition at line 61 of file XrdTpcPMarkManager.cc.