TLSSocket Class Referenceabstract
Inheritance diagram for TLSSocket:
Collaboration diagram for TLSSocket:

Public Member Functions

virtual void handshake ()=0
virtual shared_ptr
< security::cert::certificateChain
getPeerCertificates ()=0
- Public Member Functions inherited from socket
virtual ~socket ()
virtual void connect (const string &address, const port_t port)=0
virtual void disconnect ()=0
virtual bool isConnected () const =0
virtual bool waitForRead (const int msecs=30000)=0
virtual bool waitForWrite (const int msecs=30000)=0
virtual void receive (string &buffer)=0
virtual size_t receiveRaw (byte_t *buffer, const size_t count)=0
virtual void send (const string &buffer)=0
virtual void send (const char *str)=0
virtual void sendRaw (const byte_t *buffer, const size_t count)=0
virtual size_t sendRawNonBlocking (const byte_t *buffer, const size_t count)=0
virtual size_t getBlockSize () const =0
virtual unsigned int getStatus () const =0
virtual const string getPeerName () const =0
virtual const string getPeerAddress () const =0
virtual shared_ptr
< timeoutHandler
getTimeoutHandler ()=0
virtual void setTracer (shared_ptr< tracer > tracer)=0
virtual shared_ptr< tracergetTracer ()=0

Static Public Member Functions

static shared_ptr< TLSSocketwrap (shared_ptr< TLSSession > session, shared_ptr< socket > sok)

Additional Inherited Members

- Public Types inherited from socket
- Protected Member Functions inherited from socket
 socket ()
- Protected Member Functions inherited from object
 object ()
 object (const object &)
objectoperator= (const object &)
virtual ~object ()

Detailed Description

Add a TLS security layer to an existing socket.

Member Function Documentation

virtual shared_ptr<security::cert::certificateChain> getPeerCertificates ( )
pure virtual

Return the peer's certificate (chain) as sent by the peer.

server certificate chain, or NULL if the handshake has not been performed yet
virtual void handshake ( )
pure virtual

Starts a TLS handshake on this connection.

exceptions::tls_exceptionif a fatal error occurs during the negociation process, exceptions::operation_timed_out if a time-out occurs
static shared_ptr<TLSSocket> wrap ( shared_ptr< TLSSession session,
shared_ptr< socket sok 

Create a new socket object that adds a security layer around an existing socket.

sessionTLS session
soksocket to wrap

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