| 1412 | if (userHeadersSentCallback.isValid()) |
| 1413 | { |
| 1414 | userHeadersSentCallback(bufferID); |
| 1415 | } |
| 1416 | if (internalHeadersSentCallback.isValid()) |
| 1417 | { |
| 1418 | internalHeadersSentCallback(bufferID); |
| 1419 | } |
| 1420 | }}); |
| 1421 | } |
| 1422 | return HttpOutgoingMessage::sendHeaders(); |
| 1423 | } |
| 1424 | |
| 1425 | //------------------------------------------------------------------------------------------------------- |
| 1426 | // HttpConnectionsPool |
| 1427 | //------------------------------------------------------------------------------------------------------- |
| 1428 | Result HttpConnectionsPool::init(SpanWithStride<HttpConnection> connectionsStorage) |
| 1429 | { |
| 1430 | if (numConnections != 0) |
| 1431 | return Result::Error(HttpResultCategory, HttpError::PoolActiveConnectionsRemain); |
| 1432 | for (size_t idx = 0; idx < connectionsStorage.sizeInElements(); ++idx) |
| 1433 | { |
| 1434 | HttpConnection& connection = connectionsStorage[idx]; |
| 1435 | if (connection.getHeaderMemory().sizeInBytes() == 0) |
| 1436 | { |
| 1437 | return Result::Error(HttpResultCategory, HttpError::PoolHeaderStorageEmpty); |
| 1438 | } |
| 1439 | } |
| 1440 | |
| 1441 | connections = connectionsStorage; |
| 1442 | return Result(true); |
| 1443 | } |
| 1444 | |
| 1445 | Result HttpConnectionsPool::close() |
no test coverage detected