[+] ISocketChannel::GetNextFrameTargetLength

[+] ISocketChannel::SetNextFrameTargetLength
This commit is contained in:
Reece Wilson 2023-10-16 01:48:09 +01:00
parent cb60e77c63
commit 240685f7a6
3 changed files with 28 additions and 0 deletions

View File

@ -76,6 +76,18 @@ namespace Aurora::IO::Net
*/
virtual void SpecifySendProtocol(const AuSPtr<Protocol::IProtocolStack> &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.
// Exceptions will be noted.

View File

@ -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<ISocketStats> SocketChannel::GetRecvStats()
{
return AuSPtr<ISocketStats>(this->pParent_->SharedFromThis(), &this->recvStats_);

View File

@ -64,6 +64,11 @@ namespace Aurora::IO::Net
AuSPtr<Protocol::IProtocolStack> NewProtocolSendStack() override;
void SetNextFrameTargetLength(AuUInt uNextFrameSize) override;
AuUInt GetNextFrameTargetLength() override;
void SpecifyRecvProtocol(const AuSPtr<Protocol::IProtocolStack> &pRecvProtocol) override;
void SpecifySendProtocol(const AuSPtr<Protocol::IProtocolStack> &pSendProtocol) override;