You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
35 lines
962 B
C++
35 lines
962 B
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "Asio/Asio.h"
|
|
#include "AsioIoable.h"
|
|
|
|
namespace UE {
|
|
namespace Trace {
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
class FAsioSocket
|
|
: public FAsioReadable
|
|
, public FAsioWriteable
|
|
{
|
|
public:
|
|
FAsioSocket(asio::ip::tcp::socket& InSocket);
|
|
virtual ~FAsioSocket();
|
|
asio::io_context& GetIoContext();
|
|
virtual bool IsOpen() const override;
|
|
virtual void Close() override;
|
|
uint32 GetRemoteAddress() const;
|
|
uint32 GetRemotePort() const;
|
|
uint32 GetLocalPort() const;
|
|
virtual bool Read(void* Dest, uint32 Size, FAsioIoSink* Sink, uint32 Id) override;
|
|
virtual bool ReadSome(void* Dest, uint32 DestSize, FAsioIoSink* Sink, uint32 Id) override;
|
|
virtual bool Write(const void* Src, uint32 Size, FAsioIoSink* Sink, uint32 Id) override;
|
|
|
|
private:
|
|
asio::ip::tcp::socket Socket;
|
|
};
|
|
|
|
} // namespace Trace
|
|
} // namespace UE
|