diff options
| author | Stefan Boberg <[email protected]> | 2021-09-13 12:24:59 +0200 |
|---|---|---|
| committer | Stefan Boberg <[email protected]> | 2021-09-13 12:24:59 +0200 |
| commit | 4e2649977d034b913413d2cb35d4a88afc30393f (patch) | |
| tree | 9258d4329a2217d581aaedfb251a655692987d4d /zenhttp/httpshared.h | |
| parent | Added Ref<>::Get to work around issue casting a pointer to a derived type to ... (diff) | |
| download | zen-4e2649977d034b913413d2cb35d4a88afc30393f.tar.xz zen-4e2649977d034b913413d2cb35d4a88afc30393f.zip | |
Changed interface for httpServerRequest::SessionId()/RequestId() so they share storage and lazy eval logic
They now call into ParseSessionId()/ParseRequestId() when required
Eliminates redundant logic in derived implementations
Also moved package transport code into httpshared.(cpp|h) for easier sharing with client code
Added some I/O error reporting in http.sys related code
Changed IHttpPackageHandler interface to support partially updated handling flow
Diffstat (limited to 'zenhttp/httpshared.h')
| -rw-r--r-- | zenhttp/httpshared.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/zenhttp/httpshared.h b/zenhttp/httpshared.h new file mode 100644 index 000000000..dbbebb348 --- /dev/null +++ b/zenhttp/httpshared.h @@ -0,0 +1,32 @@ +// Copyright Epic Games, Inc. All Rights Reserved. + +#pragma once + +#include <zencore/iohash.h> + +namespace zen { + +class IoBuffer; +class CbPackage; + +struct CbPackageHeader +{ + uint32_t HeaderMagic; + uint32_t AttachmentCount; + uint32_t Reserved1; + uint32_t Reserved2; +}; + +static constinit uint32_t kCbPkgMagic = 0xaa77aacc; + +struct CbAttachmentEntry +{ + uint64_t AttachmentSize; + uint32_t Reserved1; + IoHash AttachmentHash; +}; + +std::vector<IoBuffer> FormatPackageMessage(const CbPackage& Data); +CbPackage ParsePackageMessage(IoBuffer Payload); + +} // namespace zen |