You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
- Abstract out platform specific implementation details into ComputePlatform.cpp/h. - Add an overridable transport implementation of ComputeSocket, similar to what is available in C#. - Add some local tests for C++ implementation. - Various refactoring to converge implementation details/names/etc... [CL 26535754 by Ben Marsh in ue5-main branch]
37 lines
835 B
C++
37 lines
835 B
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "ComputeBuffer.h"
|
|
|
|
class FComputeSocket;
|
|
|
|
//
|
|
// Allows bi-directional communication between two nodes using compute buffers
|
|
//
|
|
class FComputeChannel
|
|
{
|
|
public:
|
|
// Reader for the channel
|
|
FComputeBufferReader Reader;
|
|
|
|
// Writer for the channel
|
|
FComputeBufferWriter Writer;
|
|
|
|
FComputeChannel();
|
|
FComputeChannel(FComputeBufferReader InReader, FComputeBufferWriter InWriter);
|
|
~FComputeChannel();
|
|
|
|
// Tests whether the channel is valid
|
|
bool IsValid() const;
|
|
|
|
// Sends bytes to the remote.
|
|
size_t Send(const void* Data, size_t Size, int TimeoutMs = -1);
|
|
|
|
// Reads as many bytes as are available from the socket.
|
|
size_t Recv(void* Data, size_t Size, int TimeoutMs = -1);
|
|
|
|
// Indicate to the remote that no more data will be sent.
|
|
void MarkComplete();
|
|
};
|