/*** 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 callback; AuUInt64 cookie {}; bool SetData(const AuByteBuffer& toRead) override; bool SetData(const AuMemoryViewRead& view) override; void SetCallback(AuSPtr callback) override; bool EmptyRequest() override; ERPCRequestState GetState(); AuMemoryViewRead GetData(); void WriteDummy(); void WriteHeaderConnect(); void WriteRPCHeader(); AuUInt32 HeaderLength(); private: AuUInt32 packetLength{}; AuByteBuffer data; };