37 lines
780 B
C++
37 lines
780 B
C++
|
/***
|
||
|
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
|
||
|
|
||
|
File: AuRPCRequest.hpp
|
||
|
Date: 2022-6-29
|
||
|
Author: Reece
|
||
|
***/
|
||
|
#pragma once
|
||
|
|
||
|
struct AuRPCRequest : AuIRPCRequest
|
||
|
{
|
||
|
AuUInt32 serviceId{};
|
||
|
ERPCRequestState state{};
|
||
|
AuUInt32 methodId{};
|
||
|
AuSPtr<AuRPCRequestCallback> callback;
|
||
|
AuUInt64 cookie {};
|
||
|
|
||
|
bool SetData(const AuByteBuffer& toRead) override;
|
||
|
bool SetData(const AuMemoryViewRead& view) override;
|
||
|
|
||
|
void SetCallback(AuSPtr<AuRPCRequestCallback> callback) override;
|
||
|
|
||
|
ERPCRequestState GetState();
|
||
|
|
||
|
AuMemoryViewRead GetData();
|
||
|
|
||
|
void WriteDummy();
|
||
|
void WriteHeaderConnect();
|
||
|
void WriteRPCHeader();
|
||
|
AuUInt32 HeaderLength();
|
||
|
|
||
|
private:
|
||
|
AuUInt32 packetLength{};
|
||
|
AuByteBuffer data;
|
||
|
};
|
||
|
|