Secure socket class. More...
#include <secure.h>
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 |
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.
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 | ( | 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.
host | and optional :port we are connecting to. | |
size | of buffer and tcp fragments. |
Reimplemented from ucc::TCPSocket.
bool ucc::SSocket::pending | ( | void | ) |