|
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. | |
Public Member Functions inherited from ucommon::tcpstream | |
| 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=PF_INET, 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. | |
Public Member Functions inherited from ucommon::StreamProtocol | |
| bool | is_open (void) |
Public Member Functions inherited from ucommon::CharacterProtocol | |
| 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 |
Protected Attributes inherited from ucommon::tcpstream | |
| socket_t | so |
| timeout_t | timeout |
Protected Attributes inherited from ucommon::StreamProtocol | |
| size_t | bufsize |
| char * | gbuf |
| char * | pbuf |
Additional Inherited Members | |
Protected Member Functions inherited from ucommon::tcpstream | |
| 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) |
Protected Member Functions inherited from ucommon::StreamProtocol | |
| void | allocate (size_t size) |
| int | overflow (int code) |
| int | uflow () |
| This streambuf method is used for doing unbuffered reads through the establish tcp socket connection when in interactive mode. | |
| int | underflow () |
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.
1.8.1.1