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 (char *address, size_t size) |
void | close (void) |
Close an active stream connection. | |
void | flush (void) |
bool | is_secure (void) |
void | open (char *host, char *service, size_t size=536) |
void | release (void) |
Release the tcp stream and destroy the underlying socket. | |
sstream (secure::client_t context) | |
sstream (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 ucommon::sstream::close | ( | void | ) |
Close an active stream connection.
This does not release the socket but is a disconnect.
Reimplemented from ucommon::tcpstream.
int ucommon::sstream::sync | ( | ) |
Flush the stream input and output buffers, writes pending output.
Reimplemented from ucommon::StreamProtocol.