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) |
void | flush (void) |
bool | is_secure (void) |
void | open (const char *host, const char *service, size_t size=536) |
void | release (void) |
sstream (secure::client_t context) | |
sstream (const TCPServer *server, secure::server_t context, size_t size=536) | |
int | sync () |
![]() | |
void | close (void) |
Close an active stream connection. More... | |
void | open (Socket::address &address, unsigned segment=536) |
Open a stream connection to a tcp service. More... | |
void | open (const char *host, const char *service, unsigned segment=536) |
Open a stream connectoion to a host and service. More... | |
operator bool () const | |
See if stream connection is active. More... | |
bool | operator! () const |
See if stream is disconnected. More... | |
tcpstream (const tcpstream ©) | |
Copy constructor... More... | |
tcpstream (const TCPServer *server, unsigned segsize=536, timeout_t timeout=0) | |
Create a stream from an existing tcp listener. More... | |
tcpstream (int family=2, timeout_t timeout=0) | |
Create an unconnected tcp stream object that is idle until opened. More... | |
tcpstream (Socket::address &address, unsigned segsize=536, timeout_t timeout=0) | |
A convenience constructor that creates a connected tcp stream directly from an address. More... | |
virtual | ~tcpstream () |
Destroy a tcp stream. | |
![]() | |
bool | is_open (void) |
operator bool () | |
bool | operator! () |
int | sync (void) |
Flush the stream input and output buffers, writes pending output. More... | |
Protected Attributes | |
secure::bufio_t | bio |
bool | server |
secure::session_t | ssl |
bool | verify |
![]() | |
socket_t | so |
timeout_t | timeout |
![]() | |
size_t | bufsize |
char * | gbuf |
char * | pbuf |
Additional Inherited Members | |
![]() | |
socket_t | getsocket (void) const |
int | overflow (int ch) |
This streambuf method is used to write the output buffer through the established tcp connection. More... | |
void | release (void) |
Release the tcp stream and destroy the underlying socket. | |
int | underflow (void) |
This streambuf method is used to load the input buffer through the established tcp socket connection. More... | |
![]() | |
void | allocate (size_t size) |
void | release (void) |
int | uflow () |
This streambuf method is used for doing unbuffered reads through the establish tcp socket connection when in interactive mode. More... | |
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.