30#ifndef PT_SSL_StreamBuffer_H
31#define PT_SSL_StreamBuffer_H
33#include <Pt/Ssl/Api.h>
34#include <Pt/Ssl/Context.h>
35#include <Pt/StreamBuffer.h>
148 std::streamsize
import(std::streamsize maxImport = 0);
152 virtual std::streamsize showmanyc();
161 virtual int_type underflow();
164 virtual int_type overflow(int_type ch);
168 std::string _peerName;
169 std::size_t _ibufferSize;
171 std::size_t _obufferSize;
174 static const int _pbmax = 4;
BasicStreamBuffer()
Definition StreamBuffer.h:139
Represents a connection between a Signal/Delegate and a slot.
Definition Connection.h:96
Shared configuration for SSL connections.
Definition Context.h:113
bool isShutdown() const
Returns true if a shutdown alert was received.
virtual ~StreamBuffer()
Destructor.
void setPeerName(const std::string &peerName)
Sets the name expected in the peer certificate.
bool readHandshake(std::streamsize maxRead=0)
Reads a handshake message from the underlying stream.
void close()
Closes the stream buffer without a TLS shutdown.
virtual std::streamsize showfull()
Returns the number of characters buffered for output.
bool writeHandshake()
Writes a handshake message to the underlying stream.
StreamBuffer(Context &ctx, std::ios &ios, OpenMode mode, std::size_t bufferSize=1024)
Creates an SSL stream buffer and opens it.
bool isConnected() const
Returns true if the handshake has completed.
StreamBuffer(std::size_t bufferSize=1024)
Creates a closed SSL stream buffer.
void open(Context &ctx, std::ios &ios, OpenMode mode)
Opens the stream buffer on ios using ctx and mode.
bool isClosed() const
Returns true if the connection was closed prematurely.
bool shutdown()
Completes or starts the TLS shutdown.
const char * currentCipher() const
Returns the cipher in use, or a placeholder if not connected.
OpenMode
Open mode for an SSL stream.
Definition Context.h:56
SSL/TLS streams, certificates and contexts.
Definition Client.h:50
Core module.
Definition Allocator.h:33