ucc::SSocket Class Reference

Secure socket class. More...

#include <secure.h>

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

Public Member Functions

size_t _pull (char *address, size_t size)
 Method to pull buffer from physical i/o (read).
size_t _push (char *address, size_t size)
 Method to push buffer into physical i/o (write).
void close (void)
 Close active connection.
bool flush (void)
 Flush buffered memory to physical I/O.
bool issecure (void)
void open (TCPServer *server, size_t size=536)
 Connect a tcp socket to a client from a listener.
void open (char *host, size_t size=536)
 Connect a ssl client session to a specific host uri.
bool pending (void)
 Check for pending tcp or ssl data.
void release (void)
 Release (free) buffer memory.
 SSocket (TCPServer *server, secure::context_t context, size_t size=536)
 SSocket (char *service, secure::context_t context)

Protected Attributes

secure::bufio_t bio
secure::session_t ssl
bool verify

Detailed Description

Secure socket class.

This is used to create ssl socket connections for both clients and servers. The use depends in part on the type of context created and passed at construction time. If no context is passed (NULL), then this reverts to TCPSocket behavior.

Author:
David Sugar <dyfet@gnutelephony.org>

Definition at line 184 of file secure.h.


Member Function Documentation

size_t ucc::SSocket::_pull ( char *  address,
size_t  size 
) [virtual]

Method to pull buffer from physical i/o (read).

The address is passed to this virtual since it is hidden as private.

Parameters:
address of buffer to pull data into.
size of buffer area being pulled..
Returns:
number of read written, 0 on error or end of data.

Reimplemented from ucc::TCPSocket.

size_t ucc::SSocket::_push ( char *  address,
size_t  size 
) [virtual]

Method to push buffer into physical i/o (write).

The address is passed to this virtual since it is hidden as private.

Parameters:
address of data to push.
size of data to push.
Returns:
number of bytes written, 0 on error.

Reimplemented from ucc::TCPSocket.

bool ucc::SSocket::flush ( void   )  [virtual]

Flush buffered memory to physical I/O.

Returns:
true on success, false if not active or fails.

Reimplemented from ucc::IOBuffer.

void ucc::SSocket::open ( TCPServer server,
size_t  size = 536 
)

Connect a tcp socket to a client from a listener.

If the socket was already connected, it is automatically closed first.

Parameters:
server we are connected from.
size of buffer and tcp fragments.

Reimplemented from ucc::TCPSocket.

void ucc::SSocket::open ( char *  host,
size_t  size = 536 
)

Connect a ssl client session to a specific host uri.

If the socket was already connected, it is automatically closed first.

Parameters:
host and optional :port we are connecting to.
size of buffer and tcp fragments.

Reimplemented from ucc::TCPSocket.

bool ucc::SSocket::pending ( void   )  [virtual]

Check for pending tcp or ssl data.

Returns:
true if data pending.

Reimplemented from ucc::TCPSocket.


The documentation for this class was generated from the following file:
Generated by  doxygen 1.6.2-20100208