You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
* All standard buffers now implement IComputeBuffer directly, and do not need to have ToSharedInstance() called to create a ref-counted version. * Workers can now construct a socket directly, allowing multiple buffers to be attached. * Control messages are sent whenever a receive buffer is attached, allowing the remote to wait for it to be available. #preflight none [CL 25169238 by Ben Marsh in ue5-main branch]
35 lines
818 B
C++
35 lines
818 B
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "SharedMemoryBuffer.h"
|
|
|
|
class FComputeSocket
|
|
{
|
|
static const char* const EnvVarName;
|
|
|
|
public:
|
|
FComputeSocket();
|
|
~FComputeSocket();
|
|
|
|
/** Opens a connection to the agent process */
|
|
bool Open();
|
|
|
|
/** Close the current connection */
|
|
void Close();
|
|
|
|
/** Attaches a new buffer for receiving data */
|
|
void AttachRecvBuffer(int ChannelId, FSharedMemoryBuffer& Buffer);
|
|
|
|
/** Attaches a new buffer for sending data */
|
|
void AttachSendBuffer(int ChannelId, FSharedMemoryBuffer& Buffer);
|
|
|
|
private:
|
|
FSharedMemoryBuffer CommandBuffer;
|
|
|
|
void AttachBuffer(int ChannelId, int Type, FSharedMemoryBuffer& Buffer);
|
|
|
|
static size_t WriteVarUInt(unsigned char* Pos, unsigned int Value);
|
|
static size_t WriteString(unsigned char* Pos, const char* Text);
|
|
};
|