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

Function HttpStaticConnection

Libraries/Http/HttpConnection.h:663–680  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

661 char streamStorage[StreamBytes];
662
663 constexpr HttpStaticConnection()
664 {
665 constexpr const size_t NumSlices = ReadQueue;
666 constexpr const size_t SliceLength = StreamBytes / NumSlices;
667
668 Span<char> memory = streamStorage;
669 for (size_t idx = 0; idx < NumSlices; ++idx)
670 {
671 Span<char> slice;
672 (void)memory.sliceStartLength(idx * SliceLength, SliceLength, slice);
673 buffers[idx] = slice;
674 buffers[idx].setReusable(true);
675 }
676 this->setHeaderMemory(headerStorage);
677 this->buffersPool.setBuffers(buffers);
678 this->readableSocketStream.setReadQueue(readQueue);
679 this->writableSocketStream.setWriteQueue(writeQueue);
680 }
681};
682
683//! @}

Callers

nothing calls this directly

Calls 1

setHeaderMemoryMethod · 0.80

Tested by

no test coverage detected