diff --git a/Include/Aurora/IO/Net/ISocketChannel.hpp b/Include/Aurora/IO/Net/ISocketChannel.hpp index ab675e6a..a77f9360 100644 --- a/Include/Aurora/IO/Net/ISocketChannel.hpp +++ b/Include/Aurora/IO/Net/ISocketChannel.hpp @@ -75,6 +75,18 @@ namespace Aurora::IO::Net * @param pSendProtocol */ virtual void SpecifySendProtocol(const AuSPtr &pSendProtocol) = 0; + + /** + * @brief + * @param uNextFrameSize + */ + virtual void SetNextFrameTargetLength(AuUInt uNextFrameSize) = 0; + + /** + * @brief + * @return + */ + virtual AuUInt GetNextFrameTargetLength() = 0; // // The following specify functions are to be used before the socket has established / during preestablish. diff --git a/Source/IO/Net/AuNetSocketChannel.cpp b/Source/IO/Net/AuNetSocketChannel.cpp index d6c737c9..df0e6415 100644 --- a/Source/IO/Net/AuNetSocketChannel.cpp +++ b/Source/IO/Net/AuNetSocketChannel.cpp @@ -282,6 +282,17 @@ namespace Aurora::IO::Net this->pCachedWriter.reset(); } + + void SocketChannel::SetNextFrameTargetLength(AuUInt uNextFrameSize) + { + (void)this->inputChannel.pNetReader->SetNextFrameTargetLength(uNextFrameSize); + } + + AuUInt SocketChannel::GetNextFrameTargetLength() + { + return this->inputChannel.pNetReader->GetNextFrameTargetLength(); + } + AuSPtr SocketChannel::GetRecvStats() { return AuSPtr(this->pParent_->SharedFromThis(), &this->recvStats_); diff --git a/Source/IO/Net/AuNetSocketChannel.hpp b/Source/IO/Net/AuNetSocketChannel.hpp index 8ba4b22d..12692799 100644 --- a/Source/IO/Net/AuNetSocketChannel.hpp +++ b/Source/IO/Net/AuNetSocketChannel.hpp @@ -64,6 +64,11 @@ namespace Aurora::IO::Net AuSPtr NewProtocolSendStack() override; + void SetNextFrameTargetLength(AuUInt uNextFrameSize) override; + + AuUInt GetNextFrameTargetLength() override; + + void SpecifyRecvProtocol(const AuSPtr &pRecvProtocol) override; void SpecifySendProtocol(const AuSPtr &pSendProtocol) override;