Adaptyst
A comprehensive and architecture-agnostic performance analysis tool
Loading...
Searching...
No Matches
adaptyst::TCPAcceptor::Factory Class Reference

#include <socket.hpp>

Inheritance diagram for adaptyst::TCPAcceptor::Factory:
adaptyst::Acceptor::Factory

Public Member Functions

 Factory (std::string address, unsigned short port, bool try_subsequent_ports=false)
 
std::unique_ptr< Acceptormake_acceptor (int max_accepted)
 
std::string get_type ()
 

Detailed Description

A TCPAcceptor factory.

Constructor & Destructor Documentation

◆ Factory()

adaptyst::TCPAcceptor::Factory::Factory ( std::string address,
unsigned short port,
bool try_subsequent_ports = false )
inline

Constructs a TCPAcceptor::Factory object.

Parameters
addressAn address where the TCP server should listen at.
portA port where the TCP server should listen at.
try_subsequent_portsIndicates whether subsequent ports should be tried when the initially-specified port is already in use. The potential port change will be reflected in the output of get_connection_instructions().

Member Function Documentation

◆ get_type()

std::string adaptyst::TCPAcceptor::Factory::get_type ( )
inlinevirtual

Gets the string describing the connection type of the acceptor (e.g. TCP).

Implements adaptyst::Acceptor::Factory.

◆ make_acceptor()

std::unique_ptr< Acceptor > adaptyst::TCPAcceptor::Factory::make_acceptor ( int max_accepted)
inlinevirtual

Makes a new Acceptor-derived object.

Parameters
max_acceptedA maximum number of connections that the acceptor can accept during its lifetime. Use UNLIMITED_ACCEPTED for no limit.

Implements adaptyst::Acceptor::Factory.


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