Logo Search packages:      
Sourcecode: poco version File versions  Download package

Poco::Net::SecureStreamSocketImpl Class Reference

#include <SecureStreamSocketImpl.h>

Inheritance diagram for Poco::Net::SecureStreamSocketImpl:

Poco::Net::StreamSocketImpl Poco::Net::SocketImpl Poco::RefCountedObject

List of all members.


Detailed Description

This class implements a SSL TCP socket.

Definition at line 52 of file SecureStreamSocketImpl.h.


Public Types

enum  SelectMode { SELECT_READ = 1, SELECT_WRITE = 2, SELECT_ERROR = 4 }

Public Member Functions

SocketImplacceptConnection (SocketAddress &clientAddr)
 Creates a SecureStreamSocketImpl using the given native socket.
virtual SocketAddress address ()
virtual int available ()
void bind (const SocketAddress &address, bool reuseAddress=false)
void close ()
void connect (const SocketAddress &address, const Poco::Timespan &timeout)
void connect (const SocketAddress &address)
void connectNB (const SocketAddress &address)
void duplicate () const
bool getBroadcast ()
 Sets the value of the SO_BROADCAST socket option.
bool getKeepAlive ()
 Sets the value of the SO_KEEPALIVE socket option.
void getLinger (bool &on, int &seconds)
 Sets the value of the SO_LINGER socket option.
bool getNoDelay ()
 Sets the value of the TCP_NODELAY socket option.
bool getOOBInline ()
 Sets the value of the SO_OOBINLINE socket option.
void getOption (int level, int option, IPAddress &value)
void getOption (int level, int option, Poco::Timespan &value)
void getOption (int level, int option, unsigned char &value)
void getOption (int level, int option, unsigned &value)
void getOption (int level, int option, int &value)
virtual void getRawOption (int level, int option, void *value, poco_socklen_t &length)
virtual int getReceiveBufferSize ()
 Sets the size of the receive buffer.
virtual Poco::Timespan getReceiveTimeout ()
bool getReuseAddress ()
 Sets the value of the SO_REUSEADDR socket option.
bool getReusePort ()
virtual int getSendBufferSize ()
 Sets the size of the send buffer.
virtual Poco::Timespan getSendTimeout ()
 Sets the send timeout for the socket.
bool initialized () const
 A wrapper for the ioctl system call.
void ioctl (int request, void *arg)
 A wrapper for the ioctl system call.
void ioctl (int request, int &arg)
void listen (int backlog=64)
virtual SocketAddress peerAddress ()
 Returns the IP address and port number of the socket.
virtual bool poll (const Poco::Timespan &timeout, int mode)
int receiveBytes (void *buffer, int length, int flags=0)
int receiveFrom (void *buffer, int length, SocketAddress &address, int flags=0)
int referenceCount () const
void release () const
 Increments the object's reference count.
 SecureStreamSocketImpl (SSL *_pSSL)
 Creates the SecureStreamSocketImpl.
int sendBytes (const void *buffer, int length, int flags=0)
 Close the socket.
int sendTo (const void *buffer, int length, const SocketAddress &address, int flags=0)
void sendUrgent (unsigned char data)
void setBlocking (bool flag)
 Returns the value of the SO_BROADCAST socket option.
void setBroadcast (bool flag)
 Returns the value of the SO_OOBINLINE socket option.
void setKeepAlive (bool flag)
 Returns the value of the TCP_NODELAY socket option.
void setLinger (bool on, int seconds)
void setNoDelay (bool flag)
 Returns the value of the SO_LINGER socket option.
void setOOBInline (bool flag)
void setOption (int level, int option, const IPAddress &value)
void setOption (int level, int option, const Poco::Timespan &value)
void setOption (int level, int option, unsigned char value)
void setOption (int level, int option, unsigned value)
void setOption (int level, int option, int value)
 Returns the IP address and port number of the peer socket.
virtual void setRawOption (int level, int option, const void *value, poco_socklen_t length)
virtual void setReceiveBufferSize (int size)
virtual void setReceiveTimeout (const Poco::Timespan &timeout)
void setReuseAddress (bool flag)
 Returns the value of the SO_KEEPALIVE socket option.
void setReusePort (bool flag)
 Returns the value of the SO_REUSEADDR socket option.
virtual void setSendBufferSize (int size)
virtual void setSendTimeout (const Poco::Timespan &timeout)
void setTunnelEndPoint (const std::string &host, Poco::UInt16 port)
virtual void shutdown ()
 Shuts down the sending part of the socket connection.
virtual void shutdownReceive ()
 Close the socket.
virtual void shutdownSend ()
 Shuts down the receiving part of the socket connection.
int socketError ()
poco_socket_t sockfd ()
 Returns the value of the SO_ERROR socket option.

Protected Member Functions

virtual void init (int af)
void initSocket (int af, int type, int proto=0)
void invalidate ()
 Allows subclasses to set the socket manually, iff no valid socket is set yet!
void setSockfd (poco_socket_t aSocket)
 ~SecureStreamSocketImpl ()

Static Protected Member Functions

static void error (int code, const std::string &arg)
 Throws an appropriate exception for the given error code.
static void error (int code)
 Throws an appropriate exception for the last error.
static void error (const std::string &arg)
 Throws an appropriate exception for the last error.
static void error ()
 Returns the last error code.
static int lastError ()

Private Member Functions

SecureStreamSocketImploperator= (const SecureStreamSocketImpl &)
 SecureStreamSocketImpl (const SecureStreamSocketImpl &)
 Destroys the SecureStreamSocketImpl.

Private Attributes

SecureSocketImpl _socket

Friends

class SecureSocketImpl

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

Generated by  Doxygen 1.6.0   Back to index