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

Method activateNew

Libraries/Http/HttpConnection.cpp:1414–1442  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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//-------------------------------------------------------------------------------------------------------
1428Result 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
1445Result HttpConnectionsPool::close()

Callers 1

onNewClientMethod · 0.80

Calls 1

setHeaderMemoryMethod · 0.80

Tested by

no test coverage detected