AuroraRuntime/Source/IO/TLS/TLSProtocolRecv.hpp
Reece Wilson d68fc7fc91 [+] ByteBuffer::GetNextLinearRead()
[+] ByteBuffer::GetNextLinearWrite()
[-] ByteBuffer::WriterTryGetWriteHeadFor
[+] ITLSPrivateKeyPair
[+] ITLSContext::GetFatalErrorCodeAsString()
[+] Begin to add certificate chains
[*] Clean up TLS
2022-08-30 22:18:15 +01:00

38 lines
996 B
C++

/***
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: TLSProtocolRecv.hpp
Date: 2022-8-24
Author: Reece
***/
#pragma once
namespace Aurora::IO::TLS
{
struct TLSContext;
struct TLSProtocolRecv : Protocol::IProtocolInterceptorEx
{
TLSProtocolRecv(TLSContext *pParent);
virtual bool OnDataAvailable(const AuSPtr<Memory::ByteBuffer> &pReadInByteBuffer,
const AuSPtr<Memory::ByteBuffer> &pWriteOutByteBuffer) override;
bool TryHandshake();
bool DoHandshake(bool &bComplete);
bool DoOneTick(const AuSPtr<Memory::ByteBuffer> &pWriteOutByteBuffer);
bool bHasRead {};
AuUInt32 uBytesRead {};
AuUInt32 uBytesReadAvail {};
AuWPtr<Memory::ByteBuffer> pReadInByteBuffer;
bool &HasCompletedHandshake();
private:
TLSContext *pParent_;
bool bHasCompletedHandshake_ {};
bool bHasFailedOnce {};
};
}