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

Callers

nothing calls this directly

Calls 1

setHeaderMemoryMethod · 0.80

Tested by

no test coverage detected