aboutsummaryrefslogtreecommitdiff
path: root/zenhttp/httpshared.h
diff options
context:
space:
mode:
Diffstat (limited to 'zenhttp/httpshared.h')
-rw-r--r--zenhttp/httpshared.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/zenhttp/httpshared.h b/zenhttp/httpshared.h
index e7c9e4a56..06fdb104f 100644
--- a/zenhttp/httpshared.h
+++ b/zenhttp/httpshared.h
@@ -2,8 +2,11 @@
#pragma once
+#include <zencore/iobuffer.h>
#include <zencore/iohash.h>
+#include <functional>
+
namespace zen {
class IoBuffer;
@@ -33,6 +36,10 @@ static_assert(sizeof(CbAttachmentEntry) == 32);
std::vector<IoBuffer> FormatPackageMessage(const CbPackage& Data);
CompositeBuffer FormatPackageMessageBuffer(const CbPackage& Data);
-CbPackage ParsePackageMessage(IoBuffer Payload);
+CbPackage ParsePackageMessage(
+ IoBuffer Payload,
+ std::function<IoBuffer(const IoHash& Cid, uint64_t Size)> CreateBuffer = [](const IoHash&, uint64_t Size) -> IoBuffer {
+ return IoBuffer{Size};
+ });
} // namespace zen