UCommon
|
Secure socket using std::iostream. More...
#include <secure.h>
Public Member Functions | |
ssize_t | _read (char *address, size_t size) |
bool | _wait (void) |
ssize_t | _write (const char *address, size_t size) |
void | close (void) |
Close an active stream connection. | |
void | flush (void) |
bool | is_secure (void) |
void | open (const char *host, const char *service, size_t size=536) |
void | release (void) |
Release the tcp stream and destroy the underlying socket. | |
sstream (secure::client_t context) | |
sstream (const TCPServer *server, secure::server_t context, size_t size=536) | |
int | sync () |
Flush the stream input and output buffers, writes pending output. | |
Protected Attributes | |
secure::bufio_t | bio |
bool | server |
secure::session_t | ssl |
bool | verify |
Secure socket using std::iostream.
This class is similar to SSLBuffer but uses the libstdc++ library to stream i/o. Being based on tcpstream, it also inherits the character protocol. Like SSLBuffer, if no context is given or the handshake fails, then the stream defaults to insecure TCP connection behavior.
void ucc::sstream::close | ( | void | ) |
Close an active stream connection.
This does not release the socket but is a disconnect.
Reimplemented from ucc::tcpstream.
int ucc::sstream::sync | ( | ) |
Flush the stream input and output buffers, writes pending output.
Reimplemented from ucc::StreamProtocol.