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. | |
![]() | |
void | open (Socket::address &address, unsigned segment=536) |
Open a stream connection to a tcp service. | |
void | open (char *host, char *service, unsigned segment=536) |
Open a stream connectoion to a host and service. | |
operator bool () | |
See if stream connection is active. | |
bool | operator! () |
See if stream is disconnected. | |
tcpstream (tcpstream ©) | |
Copy constructor... | |
tcpstream (TCPServer *server, unsigned segsize=536, timeout_t timeout=0) | |
Create a stream from an existing tcp listener. | |
tcpstream (int family=2, timeout_t timeout=0) | |
Create an unconnected tcp stream object that is idle until opened. | |
tcpstream (Socket::address &address, unsigned segsize=536, timeout_t timeout=0) | |
A convenience constructor that creates a connected tcp stream directly from an address. | |
virtual | ~tcpstream () |
Destroy a tcp stream. | |
![]() | |
bool | is_open (void) |
![]() | |
int | get (void) |
Get the next character. | |
int | put (int code) |
Put the next character. |
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 | |
![]() | |
int | _getch (void) |
This streambuf method is used to load the input buffer through the established tcp socket connection. | |
int | _putch (int ch) |
This streambuf method is used to write the output buffer through the established tcp connection. | |
socket_t | getsocket (void) |
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.