#include <tsSChannelBuffer.h>
SChannel input/output buffers and their descriptors (Windows-specific). This class encapsulates an array of SecBuffer and its associated SecBufferDesc.
◆ SChannelBuffer()
| ts::SChannelBuffer::SChannelBuffer |
( |
size_t | max_buffers | ) |
|
Constructor.
- Parameters
-
| [in] | max_buffers | Maximum number of input/output buffers. |
◆ resize()
| void ts::SChannelBuffer::resize |
( |
size_t | max_buffers | ) |
|
Resize the number of buffers. All previously returned SecBuffer addresses are invalidated.
- Parameters
-
| [in] | max_buffers | Maximum number of input/output buffers. |
◆ maxSize()
| size_t ts::SChannelBuffer::maxSize |
( |
| ) |
const |
|
inline |
Get the maximum number of buffers.
- Returns
- The maximum number of buffers.
◆ currentSize()
| size_t ts::SChannelBuffer::currentSize |
( |
| ) |
const |
|
inline |
Get the current number of used buffers.
- Returns
- The current number of buffers.
◆ totalBufferSize()
| size_t ts::SChannelBuffer::totalBufferSize |
( |
| ) |
const |
Get the total size in bytes of used buffers.
- Returns
- The total size in bytes of used buffers.
◆ reset()
| void ts::SChannelBuffer::reset |
( |
| ) |
|
|
inline |
Reset the list of buffers, before a sequence of add();
◆ add()
| void ts::SChannelBuffer::add |
( |
unsigned long | type, |
|
|
void * | buffer = nullptr, |
|
|
size_t | bufsize = 0 ) |
Add the description of a new buffer. Throw std::out_of_range if there is no more free buffer.
- Parameters
-
| [in] | type | The channel type. |
| [in] | buffer | Buffer address. |
| [in] | bufsize | Buffer size in bytes. |
◆ desc()
| ::SecBufferDesc * ts::SChannelBuffer::desc |
( |
| ) |
|
|
inline |
Get the address of the buffer descriptor, typically for an SChannel call.
- Returns
- Address of the buffer descriptor.
◆ get()
| ::SecBuffer * ts::SChannelBuffer::get |
( |
unsigned long | type | ) |
|
Search the first buffer of a given type.
- Parameters
-
| [in] | type | The channel type to search. |
- Returns
- Address of the first buffer of type type or the null pointer if there is none.
◆ freeContextBuffer()
| void ts::SChannelBuffer::freeContextBuffer |
( |
| ) |
|
Properly free and clear TLS buffers, when allocated by InitializeSecurityContext or AcceptSecurityContext.
◆ TypeNames()
| const Names & ts::SChannelBuffer::TypeNames |
( |
| ) |
|
|
static |
Get names for SChannel buffer bytes.
- Returns
- A constant reference to the Names instance.
The documentation for this class was generated from the following file: