aboutsummaryrefslogtreecommitdiff
path: root/src/zenhttp
diff options
context:
space:
mode:
Diffstat (limited to 'src/zenhttp')
-rw-r--r--src/zenhttp/httpclient.cpp4
-rw-r--r--src/zenhttp/httpserver.cpp6
-rw-r--r--src/zenhttp/include/zenhttp/httpclient.h2
-rw-r--r--src/zenhttp/include/zenhttp/httpserver.h4
-rw-r--r--src/zenhttp/include/zenhttp/packageformat.h2
-rw-r--r--src/zenhttp/packageformat.cpp12
-rw-r--r--src/zenhttp/servers/httpasio.cpp6
-rw-r--r--src/zenhttp/servers/httpplugin.cpp8
-rw-r--r--src/zenhttp/servers/httpsys.cpp24
-rw-r--r--src/zenhttp/servers/httptracer.cpp2
-rw-r--r--src/zenhttp/servers/httptracer.h2
11 files changed, 36 insertions, 36 deletions
diff --git a/src/zenhttp/httpclient.cpp b/src/zenhttp/httpclient.cpp
index 1a5955609..969395427 100644
--- a/src/zenhttp/httpclient.cpp
+++ b/src/zenhttp/httpclient.cpp
@@ -758,8 +758,8 @@ HttpClient::TransactPackage(std::string_view Url, CbPackage Package, const KeyVa
// First, list of offered chunks for filtering on the server end
- eastl::vector<IoHash> AttachmentsToSend;
- std::span<const CbAttachment> Attachments = Package.GetAttachments();
+ eastl::vector<IoHash> AttachmentsToSend;
+ eastl::span<const CbAttachment> Attachments = Package.GetAttachments();
const uint32_t RequestId = ++HttpClientRequestIdCounter;
auto RequestIdString = fmt::to_string(RequestId);
diff --git a/src/zenhttp/httpserver.cpp b/src/zenhttp/httpserver.cpp
index 26c1f3025..ae4a740a1 100644
--- a/src/zenhttp/httpserver.cpp
+++ b/src/zenhttp/httpserver.cpp
@@ -26,9 +26,9 @@
#include <zencore/thread.h>
#include <zenhttp/packageformat.h>
+#include <EASTL/span.h>
#include <charconv>
#include <mutex>
-#include <span>
#include <string_view>
#include <EASTL/fixed_vector.h>
@@ -529,7 +529,7 @@ HttpServerRequest::WriteResponse(HttpResponseCode ResponseCode, HttpContentType
void
HttpServerRequest::WriteResponse(HttpResponseCode ResponseCode, HttpContentType ContentType, CompositeBuffer& Payload)
{
- std::span<const SharedBuffer> Segments = Payload.GetSegments();
+ eastl::span<const SharedBuffer> Segments = Payload.GetSegments();
eastl::fixed_vector<IoBuffer, 64> Buffers;
Buffers.reserve(Segments.size());
@@ -539,7 +539,7 @@ HttpServerRequest::WriteResponse(HttpResponseCode ResponseCode, HttpContentType
Buffers.push_back(Segment.AsIoBuffer());
}
- WriteResponse(ResponseCode, ContentType, std::span<IoBuffer>(begin(Buffers), end(Buffers)));
+ WriteResponse(ResponseCode, ContentType, eastl::span<IoBuffer>(begin(Buffers), end(Buffers)));
}
std::string
diff --git a/src/zenhttp/include/zenhttp/httpclient.h b/src/zenhttp/include/zenhttp/httpclient.h
index a46b9fd83..a9c9fe00d 100644
--- a/src/zenhttp/include/zenhttp/httpclient.h
+++ b/src/zenhttp/include/zenhttp/httpclient.h
@@ -88,7 +88,7 @@ public:
: Entries({{{std::string(Entry.first), std::string(Entry.second)}}})
{
}
- KeyValueMap(std::span<std::pair<std::string_view, std::string_view>>&& List) : Entries(List.begin(), List.end()) {}
+ KeyValueMap(eastl::span<std::pair<std::string_view, std::string_view>>&& List) : Entries(List.begin(), List.end()) {}
KeyValueMap(std::initializer_list<std::pair<std::string_view, std::string_view>>&& List) : Entries(List.begin(), List.end()) {}
};
diff --git a/src/zenhttp/include/zenhttp/httpserver.h b/src/zenhttp/include/zenhttp/httpserver.h
index 6cff5c69c..4f049ee8b 100644
--- a/src/zenhttp/include/zenhttp/httpserver.h
+++ b/src/zenhttp/include/zenhttp/httpserver.h
@@ -13,12 +13,12 @@
#include <zencore/uid.h>
#include <zenhttp/httpcommon.h>
+#include <EASTL/span.h>
#include <functional>
#include <gsl/gsl-lite.hpp>
#include <list>
#include <map>
#include <regex>
-#include <span>
#include <unordered_map>
namespace zen {
@@ -95,7 +95,7 @@ public:
Note that this is destructive in the sense that the IoBuffer instances referred to by Blobs will be
moved into our response handler array where they are kept alive, in order to reduce ref-counting storms
*/
- virtual void WriteResponse(HttpResponseCode ResponseCode, HttpContentType ContentType, std::span<IoBuffer> Blobs) = 0;
+ virtual void WriteResponse(HttpResponseCode ResponseCode, HttpContentType ContentType, eastl::span<IoBuffer> Blobs) = 0;
virtual void WriteResponse(HttpResponseCode ResponseCode) = 0;
virtual void WriteResponse(HttpResponseCode ResponseCode, HttpContentType ContentType, std::u8string_view ResponseString) = 0;
virtual void WriteResponse(HttpResponseCode ResponseCode, HttpContentType ContentType, CompositeBuffer& Payload);
diff --git a/src/zenhttp/include/zenhttp/packageformat.h b/src/zenhttp/include/zenhttp/packageformat.h
index f5bd53c5b..bd2f5573d 100644
--- a/src/zenhttp/include/zenhttp/packageformat.h
+++ b/src/zenhttp/include/zenhttp/packageformat.h
@@ -138,7 +138,7 @@ public:
void Finalize();
const eastl::vector<CbAttachment>& GetAttachments() { return m_Attachments; }
CbObject GetRootObject() { return m_RootObject; }
- std::span<IoBuffer> GetPayloadBuffers() { return m_PayloadBuffers; }
+ eastl::span<IoBuffer> GetPayloadBuffers() { return m_PayloadBuffers; }
private:
enum class State
diff --git a/src/zenhttp/packageformat.cpp b/src/zenhttp/packageformat.cpp
index b772ba2cf..9d3608656 100644
--- a/src/zenhttp/packageformat.cpp
+++ b/src/zenhttp/packageformat.cpp
@@ -16,8 +16,8 @@
#include <zencore/testutils.h>
#include <zencore/trace.h>
+#include <EASTL/span.h>
#include <EASTL/vector.h>
-#include <span>
#include <EASTL/fixed_vector.h>
@@ -59,7 +59,7 @@ CompositeBuffer
FormatPackageMessageBuffer(const CbPackage& Data, FormatFlags Flags, void* TargetProcessHandle)
{
auto Vec = FormatPackageMessageInternal(Data, Flags, TargetProcessHandle);
- return CompositeBuffer(std::span{begin(Vec), end(Vec)});
+ return CompositeBuffer(eastl::span{begin(Vec), end(Vec)});
}
static void
@@ -190,8 +190,8 @@ FormatPackageMessageInternal(const CbPackage& Data, FormatFlags Flags, void* Tar
});
#endif // ZEN_PLATFORM_WINDOWS
- const std::span<const CbAttachment>& Attachments = Data.GetAttachments();
- IoBufferVec_t ResponseBuffers;
+ const eastl::span<const CbAttachment>& Attachments = Data.GetAttachments();
+ IoBufferVec_t ResponseBuffers;
ResponseBuffers.reserve(2 + Attachments.size()); // TODO: may want to use an additional fudge factor here to avoid growing since each
// attachment is likely to consist of several buffers
@@ -266,7 +266,7 @@ FormatPackageMessageInternal(const CbPackage& Data, FormatFlags Flags, void* Tar
.Flags = CbAttachmentEntry::kIsCompressed,
.AttachmentHash = AttachmentHash};
- std::span<const SharedBuffer> Segments = Compressed.GetSegments();
+ eastl::span<const SharedBuffer> Segments = Compressed.GetSegments();
ResponseBuffers.reserve(ResponseBuffers.size() + Segments.size() - 1);
for (const SharedBuffer& Segment : Segments)
{
@@ -320,7 +320,7 @@ FormatPackageMessageInternal(const CbPackage& Data, FormatFlags Flags, void* Tar
{
*AttachmentInfo++ = {.PayloadSize = AttachmentBinary.GetSize(), .Flags = 0, .AttachmentHash = Attachment.GetHash()};
- std::span<const SharedBuffer> Segments = AttachmentBinary.GetSegments();
+ eastl::span<const SharedBuffer> Segments = AttachmentBinary.GetSegments();
ResponseBuffers.reserve(ResponseBuffers.size() + Segments.size() - 1);
for (const SharedBuffer& Segment : Segments)
{
diff --git a/src/zenhttp/servers/httpasio.cpp b/src/zenhttp/servers/httpasio.cpp
index 987d1ab64..61cb2f709 100644
--- a/src/zenhttp/servers/httpasio.cpp
+++ b/src/zenhttp/servers/httpasio.cpp
@@ -115,7 +115,7 @@ public:
virtual IoBuffer ReadPayload() override;
virtual void WriteResponse(HttpResponseCode ResponseCode) override;
- virtual void WriteResponse(HttpResponseCode ResponseCode, HttpContentType ContentType, std::span<IoBuffer> Blobs) override;
+ virtual void WriteResponse(HttpResponseCode ResponseCode, HttpContentType ContentType, eastl::span<IoBuffer> Blobs) override;
virtual void WriteResponse(HttpResponseCode ResponseCode, HttpContentType ContentType, std::u8string_view ResponseString) override;
virtual void WriteResponseAsync(std::function<void(HttpServerRequest&)>&& ContinuationHandler) override;
virtual bool TryGetRanges(HttpRanges& Ranges) override;
@@ -136,7 +136,7 @@ public:
HttpResponse() = default;
explicit HttpResponse(HttpContentType ContentType) : m_ContentType(ContentType) {}
- void InitializeForPayload(uint16_t ResponseCode, std::span<IoBuffer> BlobList)
+ void InitializeForPayload(uint16_t ResponseCode, eastl::span<IoBuffer> BlobList)
{
ZEN_MEMSCOPE(GetHttpasioTag());
@@ -920,7 +920,7 @@ HttpAsioServerRequest::WriteResponse(HttpResponseCode ResponseCode)
}
void
-HttpAsioServerRequest::WriteResponse(HttpResponseCode ResponseCode, HttpContentType ContentType, std::span<IoBuffer> Blobs)
+HttpAsioServerRequest::WriteResponse(HttpResponseCode ResponseCode, HttpContentType ContentType, eastl::span<IoBuffer> Blobs)
{
ZEN_MEMSCOPE(GetHttpasioTag());
diff --git a/src/zenhttp/servers/httpplugin.cpp b/src/zenhttp/servers/httpplugin.cpp
index d06e5a001..7d8ab983d 100644
--- a/src/zenhttp/servers/httpplugin.cpp
+++ b/src/zenhttp/servers/httpplugin.cpp
@@ -146,7 +146,7 @@ public:
virtual IoBuffer ReadPayload() override;
virtual void WriteResponse(HttpResponseCode ResponseCode) override;
- virtual void WriteResponse(HttpResponseCode ResponseCode, HttpContentType ContentType, std::span<IoBuffer> Blobs) override;
+ virtual void WriteResponse(HttpResponseCode ResponseCode, HttpContentType ContentType, eastl::span<IoBuffer> Blobs) override;
virtual void WriteResponse(HttpResponseCode ResponseCode, HttpContentType ContentType, std::u8string_view ResponseString) override;
virtual void WriteResponseAsync(std::function<void(HttpServerRequest&)>&& ContinuationHandler) override;
virtual bool TryGetRanges(HttpRanges& Ranges) override;
@@ -169,7 +169,7 @@ public:
HttpPluginResponse(const HttpPluginResponse&) = delete;
HttpPluginResponse& operator=(const HttpPluginResponse&) = delete;
- void InitializeForPayload(uint16_t ResponseCode, std::span<IoBuffer> BlobList);
+ void InitializeForPayload(uint16_t ResponseCode, eastl::span<IoBuffer> BlobList);
inline uint16_t ResponseCode() const { return m_ResponseCode; }
inline uint64_t ContentLength() const { return m_ContentLength; }
@@ -190,7 +190,7 @@ private:
};
void
-HttpPluginResponse::InitializeForPayload(uint16_t ResponseCode, std::span<IoBuffer> BlobList)
+HttpPluginResponse::InitializeForPayload(uint16_t ResponseCode, eastl::span<IoBuffer> BlobList)
{
ZEN_MEMSCOPE(GetHttppluginTag());
ZEN_TRACE_CPU("http_plugin::InitializeForPayload");
@@ -638,7 +638,7 @@ HttpPluginServerRequest::WriteResponse(HttpResponseCode ResponseCode)
}
void
-HttpPluginServerRequest::WriteResponse(HttpResponseCode ResponseCode, HttpContentType ContentType, std::span<IoBuffer> Blobs)
+HttpPluginServerRequest::WriteResponse(HttpResponseCode ResponseCode, HttpContentType ContentType, eastl::span<IoBuffer> Blobs)
{
ZEN_ASSERT(!m_Response);
ZEN_MEMSCOPE(GetHttppluginTag());
diff --git a/src/zenhttp/servers/httpsys.cpp b/src/zenhttp/servers/httpsys.cpp
index e35f27d9a..8daf02594 100644
--- a/src/zenhttp/servers/httpsys.cpp
+++ b/src/zenhttp/servers/httpsys.cpp
@@ -279,7 +279,7 @@ public:
virtual IoBuffer ReadPayload() override;
virtual void WriteResponse(HttpResponseCode ResponseCode) override;
- virtual void WriteResponse(HttpResponseCode ResponseCode, HttpContentType ContentType, std::span<IoBuffer> Blobs) override;
+ virtual void WriteResponse(HttpResponseCode ResponseCode, HttpContentType ContentType, eastl::span<IoBuffer> Blobs) override;
virtual void WriteResponse(HttpResponseCode ResponseCode, HttpContentType ContentType, std::u8string_view ResponseString) override;
virtual void WriteResponseAsync(std::function<void(HttpServerRequest&)>&& ContinuationHandler) override;
virtual bool TryGetRanges(HttpRanges& Ranges) override;
@@ -372,10 +372,10 @@ public:
HttpContentType ContentType,
const void* Payload,
size_t PayloadSize);
- HttpMessageResponseRequest(HttpSysTransaction& InRequest,
- uint16_t ResponseCode,
- HttpContentType ContentType,
- std::span<IoBuffer> Blobs);
+ HttpMessageResponseRequest(HttpSysTransaction& InRequest,
+ uint16_t ResponseCode,
+ HttpContentType ContentType,
+ eastl::span<IoBuffer> Blobs);
~HttpMessageResponseRequest();
virtual void IssueRequest(std::error_code& ErrorCode) override final;
@@ -392,7 +392,7 @@ private:
HttpContentType m_ContentType = HttpContentType::kBinary;
eastl::fixed_vector<IoBuffer, 16> m_DataBuffers;
- void InitializeForPayload(uint16_t ResponseCode, std::span<IoBuffer> Blobs);
+ void InitializeForPayload(uint16_t ResponseCode, eastl::span<IoBuffer> Blobs);
};
HttpMessageResponseRequest::HttpMessageResponseRequest(HttpSysTransaction& InRequest, uint16_t ResponseCode)
@@ -427,10 +427,10 @@ HttpMessageResponseRequest::HttpMessageResponseRequest(HttpSysTransaction& InReq
InitializeForPayload(ResponseCode, SingleBufferList);
}
-HttpMessageResponseRequest::HttpMessageResponseRequest(HttpSysTransaction& InRequest,
- uint16_t ResponseCode,
- HttpContentType ContentType,
- std::span<IoBuffer> BlobList)
+HttpMessageResponseRequest::HttpMessageResponseRequest(HttpSysTransaction& InRequest,
+ uint16_t ResponseCode,
+ HttpContentType ContentType,
+ eastl::span<IoBuffer> BlobList)
: HttpSysRequestHandler(InRequest)
, m_ContentType(ContentType)
{
@@ -442,7 +442,7 @@ HttpMessageResponseRequest::~HttpMessageResponseRequest()
}
void
-HttpMessageResponseRequest::InitializeForPayload(uint16_t ResponseCode, std::span<IoBuffer> BlobList)
+HttpMessageResponseRequest::InitializeForPayload(uint16_t ResponseCode, eastl::span<IoBuffer> BlobList)
{
ZEN_TRACE_CPU("httpsys::InitializeForPayload");
@@ -1747,7 +1747,7 @@ HttpSysServerRequest::WriteResponse(HttpResponseCode ResponseCode)
}
void
-HttpSysServerRequest::WriteResponse(HttpResponseCode ResponseCode, HttpContentType ContentType, std::span<IoBuffer> Blobs)
+HttpSysServerRequest::WriteResponse(HttpResponseCode ResponseCode, HttpContentType ContentType, eastl::span<IoBuffer> Blobs)
{
ZEN_MEMSCOPE(GetHttpsysTag());
diff --git a/src/zenhttp/servers/httptracer.cpp b/src/zenhttp/servers/httptracer.cpp
index 6a243c36b..1df9cc64a 100644
--- a/src/zenhttp/servers/httptracer.cpp
+++ b/src/zenhttp/servers/httptracer.cpp
@@ -18,7 +18,7 @@ HttpServerTracer::Initialize(std::filesystem::path DataDir)
}
void
-HttpServerTracer::WriteDebugPayload(std::string_view Filename, const std::span<const IoBuffer> Payload)
+HttpServerTracer::WriteDebugPayload(std::string_view Filename, const eastl::span<const IoBuffer> Payload)
{
uint64_t PayloadSize = 0;
eastl::vector<const IoBuffer*> Buffers;
diff --git a/src/zenhttp/servers/httptracer.h b/src/zenhttp/servers/httptracer.h
index da72c79c9..a89e5331d 100644
--- a/src/zenhttp/servers/httptracer.h
+++ b/src/zenhttp/servers/httptracer.h
@@ -16,7 +16,7 @@ class HttpServerTracer
{
public:
void Initialize(std::filesystem::path DataDir);
- void WriteDebugPayload(std::string_view Filename, const std::span<const IoBuffer> Payload);
+ void WriteDebugPayload(std::string_view Filename, const eastl::span<const IoBuffer> Payload);
private:
std::filesystem::path m_DataDir; // Application data directory