| 106 | } |
| 107 | |
| 108 | static 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 | |
| 124 | static Result runAwaitServiceProbe() |
| 125 | { |
no test coverage detected