![]() |
XRootD
|
#include <XrdHttpTpcPMarkManager.hh>
Classes | |
class | SocketInfo |
Public Member Functions | |
PMarkManager (XrdHttpExtReq &req, const TPC::TpcType type) | |
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 52 of file XrdHttpTpcPMarkManager.hh.
XrdHttpTpc::PMarkManager::PMarkManager | ( | XrdHttpExtReq & | req, |
const TPC::TpcType | type ) |
Definition at line 35 of file XrdHttpTpcPMarkManager.cc.
|
virtualdefault |
void XrdHttpTpc::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 66 of file XrdHttpTpcPMarkManager.cc.
References XrdSecEntity::addrInfo, XrdHttpTpc::PMarkManager::SocketInfo::client, TPC::Pull, and XrdNetAddrInfo::SockFD().
bool XrdHttpTpc::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 44 of file XrdHttpTpcPMarkManager.cc.
References XrdNetUtils::ConnectWithTimeout(), and isEnabled().
void XrdHttpTpc::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 111 of file XrdHttpTpcPMarkManager.cc.
bool XrdHttpTpc::PMarkManager::isEnabled | ( | ) | const |
Definition at line 58 of file XrdHttpTpcPMarkManager.cc.
Referenced by connect().
void XrdHttpTpc::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 62 of file XrdHttpTpcPMarkManager.cc.