You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
This is a binary patching and incremental downloading tool, similar to rsync or zsync. It aims to improve the large binary download processes that previously were served by robocopy (i.e. full packages produced by the build farm). The original code can be found in `//depot/usr/yuriy.odonnell/unsync`. This commit is a branch from the original location to preserve history. While the codebase is designed to be self-contained and does not depend on any engine libraries, it mostly follows the UE coding guidelines and can be built with UBT. Currently only Windows is supported, however the tool is expected to also work on Mac and Linux in the future. #rb Martin.Ridgers #preflight skip [CL 18993571 by Yuriy ODonnell in ue5-main branch]
59 lines
1.9 KiB
C++
59 lines
1.9 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "UnsyncBuffer.h"
|
|
#include "UnsyncCommon.h"
|
|
#include "UnsyncError.h"
|
|
#include "UnsyncHttp.h"
|
|
#include "UnsyncProxy.h"
|
|
#include "UnsyncRemote.h"
|
|
#include "UnsyncSocket.h"
|
|
|
|
#include <string>
|
|
|
|
namespace unsync {
|
|
|
|
struct FDirectoryManifest;
|
|
struct FTlsClientSettings;
|
|
|
|
// Returns number of blocks pushed
|
|
TResult<uint64> JupiterPush(const FDirectoryManifest& Manifest, const FRemoteDesc& RemoteDesc, FTlsClientSettings* TlsSettings = nullptr);
|
|
|
|
TResult<> JupiterPutRawBlob(FHttpConnection& Connection,
|
|
const std::string_view BaseUrl,
|
|
const std::string_view HttpHeaders,
|
|
FBufferView Blob,
|
|
const FHash160& Hash);
|
|
|
|
TResult<FBuffer> JupiterGetRawBlob(FHttpConnection& Connection,
|
|
const std::string_view,
|
|
const std::string_view HttpHeaders,
|
|
const FHash160& Hash);
|
|
|
|
TResult<> JupiterCheckAccess(FHttpConnection& Connection, std::string_view JupiterNamespace, std::string_view HttpHeaders);
|
|
|
|
struct FJupiterProtocolImpl : FRemoteProtocolBase
|
|
{
|
|
FJupiterProtocolImpl(const FRemoteDesc& InSettings,
|
|
const FBlockRequestMap* InRequestMap,
|
|
const FTlsClientSettings* TlsSettings,
|
|
std::string_view HttpHeaders);
|
|
virtual bool IsValid() const override;
|
|
virtual TResult<FBuffer> DownloadManifest(std::string_view ManifestName) override;
|
|
virtual FDownloadResult Download(const TArrayView<FNeedBlock> NeedBlocks, const FBlockDownloadCallback& CompletionCallback) override;
|
|
virtual void Invalidate() override;
|
|
virtual bool Contains(const FDirectoryManifest& Manifest) override;
|
|
|
|
FHttpConnection Connection;
|
|
std::string HttpHeaders; // TODO: store this in the HttpConnection instead
|
|
FRemoteDesc RemoteDesc;
|
|
|
|
bool bConnected = false;
|
|
uint64 ErrorsSinceLastSuccess = 0;
|
|
uint64 TotalErrors = 0;
|
|
uint64 TotalRequests = 0;
|
|
};
|
|
|
|
} // namespace unsync
|