From 1517ccf4c8c28a79af2989d10fd413675a5d6498 Mon Sep 17 00:00:00 2001 From: Wolftein Date: Fri, 16 Feb 2024 12:03:07 -0300 Subject: [PATCH] Updated to latest Aurora.Engine. --- Source/Private/Network/COM_Client.cpp | 29 ++++++++++++++++++++++++--- Source/Private/Network/COM_Client.hpp | 20 +++++++++++++----- Source/Private/Network/COM_Server.cpp | 4 ++-- Source/Private/Network/COM_Server.hpp | 6 +++--- 4 files changed, 46 insertions(+), 13 deletions(-) diff --git a/Source/Private/Network/COM_Client.cpp b/Source/Private/Network/COM_Client.cpp index a6e6461..f2501a3 100644 --- a/Source/Private/Network/COM_Client.cpp +++ b/Source/Private/Network/COM_Client.cpp @@ -21,9 +21,27 @@ inline namespace COM // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- - HRESULT Network_Client::Attach(Network_Protocol_ * Protocol) + HRESULT Network_Client::SetAttachment(vbInt32 Attachment) { - mWrapper->Attach(CCast(Protocol)); + mWrapper->SetAttachment(Attachment); + return S_OK; + } + + // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- + // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- + + HRESULT Network_Client::GetAttachment(vbInt32 * Result) + { + (* Result) = mWrapper->GetAttachment(); + return S_OK; + } + + // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- + // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- + + HRESULT Network_Client::SetProtocol(Network_Protocol_ * Protocol) + { + mWrapper->SetProtocol(CCast(Protocol)); return S_OK; } @@ -39,9 +57,14 @@ inline namespace COM // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- - HRESULT Network_Client::Write(BinaryWriter_ * Message) + HRESULT Network_Client::Write(BinaryWriter_ * Message, vbBool Urgent) { mWrapper->Write(CCast(Message).GetData()); + + if (VBIsTrue(Urgent)) + { + mWrapper->Flush(); + } return S_OK; } diff --git a/Source/Private/Network/COM_Client.hpp b/Source/Private/Network/COM_Client.hpp index 2f5a0c0..60349ba 100644 --- a/Source/Private/Network/COM_Client.hpp +++ b/Source/Private/Network/COM_Client.hpp @@ -28,11 +28,15 @@ inline namespace COM [object, uuid("59C3336C-C941-11EE-ADEA-1418C3A8EDB8"), pointer_default(unique)] __interface Network_Client_ { - HRESULT Attach([in] Network_Protocol_ * Protocol); + HRESULT SetAttachment([in] vbInt32 Attachment); + + HRESULT GetAttachment([out, retval] vbInt32 * Result); + + HRESULT SetProtocol([in] Network_Protocol_ * Protocol); HRESULT Close([in] vbBool Forcibly); - HRESULT Write([in] BinaryWriter_ * Message); + HRESULT Write([in] BinaryWriter_ * Message, [in, defaultvalue(false)] vbBool Urgent); HRESULT Flush(); @@ -45,14 +49,20 @@ inline namespace COM { public: - // \see Network_Client_::Attach - HRESULT Attach(Network_Protocol_ * Protocol) override; + // \see Network_Client_::SetAttachment + HRESULT SetAttachment(vbInt32 Attachment) override; + + // \see Network_Client_::GetAttachment + HRESULT GetAttachment(vbInt32 * Result) override; + + // \see Network_Client_::SetProtocol + HRESULT SetProtocol(Network_Protocol_ * Protocol) override; // \see Network_Client_::Close HRESULT Close(vbBool Forcibly) override; // \see Network_Client_::Write - HRESULT Write(BinaryWriter_ * Message) override; + HRESULT Write(BinaryWriter_ * Message, vbBool Urgent) override; // \see Network_Client_::Flush HRESULT Flush() override; diff --git a/Source/Private/Network/COM_Server.cpp b/Source/Private/Network/COM_Server.cpp index 630f3da..909be40 100644 --- a/Source/Private/Network/COM_Server.cpp +++ b/Source/Private/Network/COM_Server.cpp @@ -21,9 +21,9 @@ inline namespace COM // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- - HRESULT Network_Server::Attach(Network_Protocol_ * Protocol) + HRESULT Network_Server::SetProtocol(Network_Protocol_ * Protocol) { - mWrapper->Attach(CCast(Protocol)); + mWrapper->SetProtocol(CCast(Protocol)); return S_OK; } diff --git a/Source/Private/Network/COM_Server.hpp b/Source/Private/Network/COM_Server.hpp index aaedd6a..5c3e55d 100644 --- a/Source/Private/Network/COM_Server.hpp +++ b/Source/Private/Network/COM_Server.hpp @@ -27,7 +27,7 @@ inline namespace COM [object, uuid("70DADE73-C941-11EE-ADEA-1418C3A8EDB8"), pointer_default(unique)] __interface Network_Server_ { - HRESULT Attach([in] Network_Protocol_ * Protocol); + HRESULT SetProtocol([in] Network_Protocol_ * Protocol); HRESULT Disconnect([in] vbBool Forcibly); @@ -42,8 +42,8 @@ inline namespace COM { public: - // \see Network_Server_::Attach - HRESULT Attach(Network_Protocol_ * Protocol) override; + // \see Network_Server_::SetProtocol + HRESULT SetProtocol(Network_Protocol_ * Protocol) override; // \see Network_Server_::Disconnect HRESULT Disconnect(vbBool Forcibly) override;