Public Member Functions | Protected Attributes

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)
size_t _push (const char *address, size_t size)
void close (void)
 Close active connection.
bool flush (void)
bool issecure (void)
void open (TCPServer *server, size_t size=536)
 Connect a tcp socket to a client from a listener.
void open (const 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)
 Shutdown and close the socket.
 SSocket (TCPServer *server, secure::context_t context, size_t size=536)
 SSocket (const 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

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 ( const 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   ) 

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: