void NetworkInterfaceIntegrationFixture::startNet( std::unique_ptr<NetworkConnectionHook> connectHook) { ConnectionPool::Options options; #ifdef _WIN32 // Connections won't queue on widnows, so attempting to open too many connections // concurrently will result in refused connections and test failure. options.maxConnections = 16u; #else options.maxConnections = 256u; #endif _net = makeNetworkInterface( "NetworkInterfaceIntegrationFixture", std::move(connectHook), nullptr, std::move(options)); _net->startup(); }
std::unique_ptr<NetworkInterface> makeNetworkInterface(std::string instanceName) { return makeNetworkInterface(std::move(instanceName), nullptr, nullptr); }
std::unique_ptr<NetworkInterface> makeNetworkInterface() { return makeNetworkInterface(nullptr, nullptr); }