You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
be972be826
#rb jb #rnx [CL 14762673 by Martin Ridgers in ue5-main branch]
43 lines
1.0 KiB
C++
43 lines
1.0 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "Asio/Asio.h"
|
|
#include "AsioIoable.h"
|
|
#include "AsioTcpServer.h"
|
|
#include "AsioTickable.h"
|
|
|
|
namespace UE {
|
|
namespace Trace {
|
|
|
|
class FAsioRecorder;
|
|
class FAsioSocket;
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
class FAsioTraceRelay
|
|
: public FAsioTcpServer
|
|
, public FAsioIoSink
|
|
, public FAsioTickable
|
|
{
|
|
public:
|
|
FAsioTraceRelay(asio::io_context& IoContext, FAsioReadable* InInput, uint32 InTraceIf, FAsioRecorder& InRecorder);
|
|
~FAsioTraceRelay();
|
|
bool IsOpen() const;
|
|
void Close();
|
|
|
|
private:
|
|
virtual bool OnAccept(asio::ip::tcp::socket& Socket) override;
|
|
virtual void OnTick() override;
|
|
virtual void OnIoComplete(uint32 Id, int32 Size) override;
|
|
enum { OpStart, OpRead, OpSend };
|
|
static const uint32 BufferSize = 64 << 10;
|
|
FAsioReadable* Input;
|
|
FAsioSocket* Output = nullptr;
|
|
FAsioRecorder& Recorder;
|
|
uint32 SessionId;
|
|
uint8 Buffer[BufferSize];
|
|
};
|
|
|
|
} // namespace Trace
|
|
} // namespace UE
|