MCPcopy Create free account
hub / github.com/Pagghiu/SaneCppLibraries / serviceProbe

Function serviceProbe

Examples/AwaitServiceProbe/AwaitServiceProbe.cpp:108–122  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

106}
107
108static AwaitTask serviceProbe(AwaitEventLoop& await, const SocketDescriptor& serverSocket,
109 const SocketDescriptor& client, SocketIPAddress address, SocketDescriptor& accepted,
110 Span<char> replyBuffer, AwaitSocketReceiveResult& reply,
111 AwaitTimeoutResult& maintenanceTimeout)
112{
113 AwaitTask networkTask = networkExchange(await, serverSocket, client, address, accepted, replyBuffer, reply);
114 AwaitTask maintenanceTask = boundedMaintenance(await, maintenanceTimeout);
115
116 AwaitTask* children[2] = {&networkTask, &maintenanceTask};
117 AwaitTaskGroup group(await, children);
118 SC_CO_TRY(group.spawnAll(children));
119 SC_CO_TRY(co_await group.waitAll());
120
121 co_return Result(true);
122}
123
124static Result runAwaitServiceProbe()
125{

Callers 1

runAwaitServiceProbeFunction · 0.85

Calls 5

networkExchangeFunction · 0.85
boundedMaintenanceFunction · 0.85
spawnAllMethod · 0.80
waitAllMethod · 0.80
ResultClass · 0.50

Tested by

no test coverage detected