xrootd
Loading...
Searching...
No Matches
Classes | Public Member Functions | Private Attributes | List of all members
PMarkManager Class Reference

#include <PMarkManager.hh>

Collaboration diagram for 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
 
int mInitialFD = -1
 

Detailed Description

This class will manage packet marking handles for TPC transfers

Each time a socket will be opened by curl (via the opensocket_callback), the manager will register the related information to the socket.

Once the transfer will start we will start the packet marking by creating XrdNetPMark::Handle objects from the socket information previously registered.

In the case of multi-stream HTTP TPC transfers, a packet marking handle will be created for each stream. The first one will be created as a basic one. The other will be created using the first packet marking handle as a basis.

Constructor & Destructor Documentation

◆ PMarkManager()

PMarkManager::PMarkManager ( XrdNetPMark pmark)

◆ ~PMarkManager()

virtual PMarkManager::~PMarkManager ( )
virtualdefault

Member Function Documentation

◆ addFd()

void 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

◆ beginPMarks()

void PMarkManager::beginPMarks ( )

Creates the different packet marking handles allowing to mark the transfer packets

Call this after the curl_multi_perform() has been called.

◆ endPmark()

void 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

◆ startTransfer()

void 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

◆ mInitialFD

int PMarkManager::mInitialFD = -1
private

◆ mPmark

XrdNetPMark* PMarkManager::mPmark
private

◆ mPmarkHandles

std::map<int,std::unique_ptr<XrdNetPMark::Handle> > PMarkManager::mPmarkHandles
private

◆ mReq

XrdHttpExtReq* PMarkManager::mReq
private

◆ mSocketInfos

std::queue<SocketInfo> PMarkManager::mSocketInfos
private

◆ mTransferWillStart

bool PMarkManager::mTransferWillStart
private

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