MCPcopy Create free account
hub / github.com/apple/foundationdb / setupNetwork

Function setupNetwork

fdbclient/NativeAPI.actor.cpp:2574–2588  ·  view source on GitHub ↗

Setup g_network and start monitoring for network busyness

Source from the content-addressed store, hash-verified

2572
2573// Setup g_network and start monitoring for network busyness
2574void setupNetwork(uint64_t transportId, UseMetrics useMetrics) {
2575 if (g_network)
2576 throw network_already_setup();
2577
2578 if (!networkOptions.logClientInfo.present())
2579 networkOptions.logClientInfo = true;
2580
2581 setupGlobalKnobs();
2582 g_network = newNet2(tlsConfig, false, useMetrics || networkOptions.traceDirectory.present());
2583 g_network->addStopCallback(Net2FileSystem::stop);
2584 FlowTransport::createInstance(true, transportId, WLTOKEN_RESERVED_COUNT);
2585 Net2FileSystem::newFileSystem();
2586
2587 uncancellable(monitorNetworkBusyness());
2588}
2589
2590void runNetwork() {
2591 if (!g_network) {

Callers 5

mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
setupNetworkMethod · 0.85

Calls 5

setupGlobalKnobsFunction · 0.85
newNet2Function · 0.85
uncancellableFunction · 0.85
presentMethod · 0.45
addStopCallbackMethod · 0.45

Tested by

no test coverage detected