Secure socket class. More...
#include <secure.h>
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 |
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.
Definition at line 184 of file secure.h.
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.
address | of buffer to pull data into. | |
size | of buffer area being pulled.. |
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.
address | of data to push. | |
size | of data to push. |
Reimplemented from ucc::TCPSocket.
bool ucc::SSocket::flush | ( | void | ) | [virtual] |
Flush buffered memory to physical I/O.
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.
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.
host | and optional :port we are connecting to. | |
size | of buffer and tcp fragments. |
Reimplemented from ucc::TCPSocket.
bool ucc::SSocket::pending | ( | void | ) | [virtual] |