14 m_OutgoingData(a_BufferSize),
15 m_IncomingData(a_BufferSize)
61 return MBEDTLS_ERR_SSL_WANT_READ;
69 return static_cast<int>(NumBytes);
82 return MBEDTLS_ERR_SSL_WANT_WRITE;
88 return static_cast<int>(a_NumBytes);
#define MBEDTLS_ERR_NET_RECV_FAILED
Reading information from the socket failed.
#define MBEDTLS_ERR_NET_SEND_FAILED
Sending information through the socket failed.
void CommitRead(void)
Removes the bytes that have been read from the ringbuffer.
bool ReadBuf(void *a_Buffer, size_t a_Count)
Reads a_Count bytes into a_Buffer; returns true if successful.
size_t GetFreeSpace(void) const
Returns the number of bytes that can be successfully written to the ringbuffer.
size_t GetReadableSpace(void) const
Returns the number of bytes that are currently available for reading (may be less than UsedSpace due ...
bool CanWriteBytes(size_t a_Count) const
Returns true if the specified amount of bytes are available for writing.
void ResetRead(void)
Restarts next reading operation at the start of the ringbuffer.
bool Write(const void *a_Bytes, size_t a_Count)
Writes the bytes specified to the ringbuffer.
cByteBuffer m_IncomingData
Buffer for the data that has come in and needs to be decrypted from the SSL stream.
size_t WriteIncoming(const void *a_Data, size_t a_NumBytes)
Stores the specified data in the "incoming" buffer, to be process by the SSL decryptor.
virtual int SendEncrypted(const unsigned char *a_Buffer, size_t a_NumBytes) override
cBufferedSslContext(size_t a_BufferSize=64000)
Creates a new context with the buffers of specified size for the encrypted / decrypted data.
virtual int ReceiveEncrypted(unsigned char *a_Buffer, size_t a_NumBytes) override
cByteBuffer m_OutgoingData
Buffer for the data that has been encrypted into the SSL stream and should be sent out.
size_t ReadOutgoing(void *a_Data, size_t a_DataMaxSize)
Retrieves data from the "outgoing" buffer, after being processed by the SSL encryptor.