UCommon
Public Member Functions | Protected Attributes
ucc::sstream Class Reference

Secure socket using std::iostream. More...

#include <secure.h>

Inheritance diagram for ucc::sstream:
Inheritance graph
[legend]
Collaboration diagram for ucc::sstream:
Collaboration graph
[legend]

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

Detailed Description

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.

Author:
David Sugar <dyfet@gnutelephony.org>

Definition at line 583 of file secure.h.


Member Function Documentation

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.

Returns:
0 on success, or error code.

Reimplemented from ucc::StreamProtocol.


The documentation for this class was generated from the following file: