wrench::NetworkConnectionManager Class Reference

An abstraction that manages a pool of network connections. More...

#include <NetworkConnectionManager.h>

Public Member Functions

 NetworkConnectionManager (unsigned long max_num_data_connections)
 Constructor. More...
 
void addConnection (std::unique_ptr< NetworkConnection > connection)
 Add a new connection. More...
 
std::pair< std::unique_ptr< NetworkConnection >, bool > waitForNetworkConnection ()
 Wait for the next network connection to change state. More...
 

Detailed Description

An abstraction that manages a pool of network connections.

Constructor & Destructor Documentation

◆ NetworkConnectionManager()

wrench::NetworkConnectionManager::NetworkConnectionManager ( unsigned long  max_num_data_connections)

Constructor.

Parameters
max_num_data_connectionsmaximum number of data connections that can be active at the same time

Member Function Documentation

◆ addConnection()

void wrench::NetworkConnectionManager::addConnection ( std::unique_ptr< NetworkConnection connection)

Add a new connection.

Parameters
connectiona network connection

◆ waitForNetworkConnection()

std::pair< std::unique_ptr< NetworkConnection >, bool > wrench::NetworkConnectionManager::waitForNetworkConnection ( )

Wait for the next network connection to change state.

Returns
a network connection that has finished and its status (true: success, false: failure)

The documentation for this class was generated from the following files:
  • /Users/rafsilva/Documents/isi/workspace/wrench/wrench/include/wrench/services/storage/simple/NetworkConnectionManager.h
  • /Users/rafsilva/Documents/isi/workspace/wrench/wrench/src/wrench/services/storage/simple/NetworkConnectionManager.cpp