| 6 | { |
| 7 | |
| 8 | Result 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 | |
| 27 | Result HttpAsyncServer::resizeInternal(SpanWithStride<HttpConnection> connectionsSpan) |
| 28 | { |