xrootd
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Public Member Functions | Private Attributes | List of all members
XrdTpc::PMarkManager Class Reference

#include <XrdTpcPMarkManager.hh>

Collaboration diagram for XrdTpc::PMarkManager:
Collaboration graph
[legend]

Classes

class  SocketInfo
 

Public Member Functions

 PMarkManager (XrdNetPMark *pmark)
 
void addFd (int fd, const struct sockaddr *sockP)
 
void startTransfer (XrdHttpExtReq *req)
 
void beginPMarks ()
 
void endPmark (int fd)
 
virtual ~PMarkManager ()=default
 

Private Attributes

std::queue< SocketInfomSocketInfos
 
std::map< int, std::unique_ptr
< XrdNetPMark::Handle > > 
mPmarkHandles
 
XrdNetPMarkmPmark
 
bool mTransferWillStart
 
XrdHttpExtReqmReq
 

Constructor & Destructor Documentation

XrdTpc::PMarkManager::PMarkManager ( XrdNetPMark pmark)
virtual XrdTpc::PMarkManager::~PMarkManager ( )
virtualdefault

Member Function Documentation

void XrdTpc::PMarkManager::addFd ( int  fd,
const struct sockaddr *  sockP 
)

Add the connected socket information that will be used for packet marking to this manager class Note: these info will only be added if startTransfer(...) has been called. It allows to ensure that the connection will be related to the data transfers and not for anything else. We only want to mark the traffic of the transfers.

Parameters
fdthe socket file descriptor
sockPthe structure describing the address of the socket
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.

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.

Parameters
fdthe fd of the socket to be closed
void XrdTpc::PMarkManager::startTransfer ( XrdHttpExtReq req)

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.

Parameters
reqthe request object that will be used later on to get some information about the transfer

Member Data Documentation

XrdNetPMark* XrdTpc::PMarkManager::mPmark
private
std::map<int,std::unique_ptr<XrdNetPMark::Handle> > XrdTpc::PMarkManager::mPmarkHandles
private
XrdHttpExtReq* XrdTpc::PMarkManager::mReq
private
std::queue<SocketInfo> XrdTpc::PMarkManager::mSocketInfos
private
bool XrdTpc::PMarkManager::mTransferWillStart
private

The documentation for this class was generated from the following file: