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

Method initInternal

Libraries/Http/HttpAsyncServer.cpp:8–25  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6{
7
8Result HttpAsyncServer::initInternal(SpanWithStride<HttpConnection> connectionsSpan)
9{
10 for (size_t idx = 0; idx < connectionsSpan.sizeInElements(); ++idx)
11 {
12 HttpConnection& connection = connectionsSpan[idx];
13 if (connection.readableSocketStream.getReadQueueSize() == 0)
14 {
15 return Result::Error("HttpConnection::readableSocketStream::readQueue is empty");
16 }
17 if (connection.writableSocketStream.getWriteQueueSize() == 0)
18 {
19 return Result::Error("HttpConnection::writableSocketStream::writeQueue is empty");
20 }
21 SC_TRY_MSG(connection.buffersPool.getNumBuffers() > 0, "HttpAsyncServer - AsyncBuffersPool is empty");
22 }
23 SC_TRY(connections.init(connectionsSpan.castTo<HttpConnection>()));
24 return Result(true);
25}
26
27Result HttpAsyncServer::resizeInternal(SpanWithStride<HttpConnection> connectionsSpan)
28{

Callers

nothing calls this directly

Calls 3

ErrorEnum · 0.50
ResultClass · 0.50
initMethod · 0.45

Tested by

no test coverage detected