Files
ben marsh 7a2bb1ff3d Horde: Initial port of EpicGames.Horde storage library to C++.
Still plenty of missing features:
* Content-defined chunking
* Caching
* Hashing and deduplication of nodes through BlobWriter
* Writing of aliases and refs through BlobWriter
* HTTP client

[CL 30022723 by ben marsh in ue5-main branch]
2023-11-30 15:43:35 -05:00

41 lines
781 B
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#include "Compute/ComputeChannel.h"
#include <string.h>
#include <stdio.h>
#include "Compute/ComputeSocket.h"
FComputeChannel::FComputeChannel()
{
}
FComputeChannel::FComputeChannel(FComputeBufferReader InReader, FComputeBufferWriter InWriter)
: Reader(MoveTemp(InReader))
, Writer(MoveTemp(InWriter))
{
}
FComputeChannel::~FComputeChannel()
{
}
bool FComputeChannel::IsValid() const
{
return Reader.IsValid();
}
size_t FComputeChannel::Send(const void* Data, size_t Size, int TimeoutMs)
{
return Writer.Write(Data, Size, TimeoutMs);
}
size_t FComputeChannel::Recv(void* Data, size_t Size, int TimeoutMs)
{
return Reader.Read(Data, Size, TimeoutMs);
}
void FComputeChannel::MarkComplete()
{
Writer.MarkComplete();
}