Cuberite
A lightweight, fast and extensible game server for Minecraft
Public Member Functions | Protected Member Functions | Protected Attributes | Private Types | List of all members
cBufferedSslContext Class Reference

#include <BufferedSslContext.h>

Inheritance diagram for cBufferedSslContext:
Inheritance graph
[legend]
Collaboration diagram for cBufferedSslContext:
Collaboration graph
[legend]

Public Member Functions

 cBufferedSslContext (size_t a_BufferSize=64000)
 Creates a new context with the buffers of specified size for the encrypted / decrypted data. More...
 
size_t ReadOutgoing (void *a_Data, size_t a_DataMaxSize)
 Retrieves data from the "outgoing" buffer, after being processed by the SSL encryptor. More...
 
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. More...
 

Protected Member Functions

virtual int ReceiveEncrypted (unsigned char *a_Buffer, size_t a_NumBytes) override
 
virtual int SendEncrypted (const unsigned char *a_Buffer, size_t a_NumBytes) override
 

Protected Attributes

cByteBuffer m_IncomingData
 Buffer for the data that has come in and needs to be decrypted from the SSL stream. More...
 
cByteBuffer m_OutgoingData
 Buffer for the data that has been encrypted into the SSL stream and should be sent out. More...
 

Private Types

using Super = cSslContext
 

Detailed Description

Definition at line 19 of file BufferedSslContext.h.

Member Typedef Documentation

◆ Super

using cBufferedSslContext::Super = cSslContext
private

Definition at line 22 of file BufferedSslContext.h.

Constructor & Destructor Documentation

◆ cBufferedSslContext()

cBufferedSslContext::cBufferedSslContext ( size_t  a_BufferSize = 64000)

Creates a new context with the buffers of specified size for the encrypted / decrypted data.

Definition at line 13 of file BufferedSslContext.cpp.

Member Function Documentation

◆ ReadOutgoing()

size_t cBufferedSslContext::ReadOutgoing ( void *  a_Data,
size_t  a_DataMaxSize 
)

Retrieves data from the "outgoing" buffer, after being processed by the SSL encryptor.

This is the data to be sent to the SSL peer. Returns the number of bytes actually retrieved.

Definition at line 38 of file BufferedSslContext.cpp.

◆ ReceiveEncrypted()

int cBufferedSslContext::ReceiveEncrypted ( unsigned char *  a_Buffer,
size_t  a_NumBytes 
)
overrideprotectedvirtual

Definition at line 54 of file BufferedSslContext.cpp.

◆ SendEncrypted()

int cBufferedSslContext::SendEncrypted ( const unsigned char *  a_Buffer,
size_t  a_NumBytes 
)
overrideprotectedvirtual

Definition at line 76 of file BufferedSslContext.cpp.

◆ WriteIncoming()

size_t cBufferedSslContext::WriteIncoming ( const void *  a_Data,
size_t  a_NumBytes 
)

Stores the specified data in the "incoming" buffer, to be process by the SSL decryptor.

This is the data received from the SSL peer. Returns the number of bytes actually stored. If 0 is returned, owner should check the error state.

Definition at line 23 of file BufferedSslContext.cpp.

Member Data Documentation

◆ m_IncomingData

cByteBuffer cBufferedSslContext::m_IncomingData
protected

Buffer for the data that has come in and needs to be decrypted from the SSL stream.

Definition at line 44 of file BufferedSslContext.h.

◆ m_OutgoingData

cByteBuffer cBufferedSslContext::m_OutgoingData
protected

Buffer for the data that has been encrypted into the SSL stream and should be sent out.

Definition at line 41 of file BufferedSslContext.h.


The documentation for this class was generated from the following files: