tnt::openssl_iostream Class Reference

#include <tnt/openssl.h>

Inheritance diagram for tnt::openssl_iostream:
tnt::OpensslStream cxxtools::net::TcpSocket cxxtools::IODevice cxxtools::Selectable cxxtools::NonCopyable

Public Member Functions

 openssl_iostream (unsigned bufsize=8192, int timeout=-1)
 openssl_iostream (const OpensslServer &server, unsigned bufsize=8192, int timeout=-1)
void setTimeout (int timeout)
int getTimeout () const
- Public Member Functions inherited from tnt::OpensslStream
 OpensslStream ()
 OpensslStream (const OpensslServer &server, bool inherit=false)
 ~OpensslStream ()
void accept (const OpensslServer &server, bool inherit=false)
void handshake (const OpensslServer &server)
int sslRead (char *buffer, int bufsize) const
int sslWrite (const char *buffer, int bufsize) const
void shutdown () const
- Public Member Functions inherited from cxxtools::net::TcpSocket
 TcpSocket ()
 TcpSocket (const TcpServer &server, unsigned flags=0)
 TcpSocket (const std::string &ipaddr, unsigned short int port)
 TcpSocket (const AddrInfo &addrinfo)
 ~TcpSocket ()
std::string getSockAddr () const
std::string getPeerAddr () const
void setTimeout (std::size_t msecs)
std::size_t timeout () const
void accept (const TcpServer &server, unsigned flags=0)
void connect (const AddrInfo &addrinfo)
void connect (const std::string &ipaddr, unsigned short int port)
bool beginConnect (const AddrInfo &addrinfo)
bool beginConnect (const std::string &ipaddr, unsigned short int port)
void endConnect ()
bool isConnected () const
int getFd () const
short poll (short events) const
virtual SelectableImpl & simpl ()
virtual IODeviceImpl & ioimpl ()
- Public Member Functions inherited from cxxtools::IODevice
virtual ~IODevice ()
void beginRead (char *buffer, size_t n)
size_t endRead ()
size_t read (char *buffer, size_t n)
 Read data from I/O device.
size_t beginWrite (const char *buffer, size_t n)
size_t endWrite ()
size_t write (const char *buffer, size_t n)
 Write data to I/O device.
void cancel ()
 Cancels asynchronous reading and writing.
bool seekable () const
 Returns true if device is seekable.
pos_type seek (off_type offset, std::ios::seekdir sd)
 Move the next read position to the given offset.
size_t peek (char *buffer, size_t n)
 Read data from I/O device without consuming them.
void sync ()
 Synchronize device.
pos_type position ()
 Returns the current I/O position.
bool eof () const
 Returns if the device has reached EOF.
bool async () const
 Returns true if the device operates in asynchronous mode.
bool reading () const
bool writing () const
char * rbuf () const
size_t rbuflen () const
size_t ravail () const
const char * wbuf () const
size_t wbuflen () const
size_t wavail () const
- Public Member Functions inherited from cxxtools::Selectable
virtual ~Selectable ()
void setSelector (SelectorBase *parent)
SelectorBaseselector ()
const SelectorBaseselector () const
void close ()
 Closes the I/O device.
bool wait (std::size_t msecs=WaitInfinite)
bool enabled () const
 Test if the I/O device object is enabled.
bool idle () const
bool busy () const
bool avail () const

Additional Inherited Members

- Public Types inherited from cxxtools::net::TcpSocket
enum  { INHERIT = 1, DEFER_ACCEPT = 2 }
- Public Attributes inherited from cxxtools::net::TcpSocket
Signal< TcpSocket & > connected
Signal< TcpSocket & > closed
 Notifies when the device is closed while no reading or writing is pending.
- Static Public Attributes inherited from cxxtools::IODevice
static const OpenMode Sync = IOS_Sync
static const OpenMode Async = IOS_Async
static const OpenMode Read = IOS_Read
static const OpenMode Write = IOS_Write
static const OpenMode AtEnd = IOS_AtEnd
static const OpenMode Append = IOS_Append
static const OpenMode Trunc = IOS_Trunc
- Protected Member Functions inherited from cxxtools::net::TcpSocket
 TcpSocket (TcpSocketImpl *impl)
virtual void onClose ()
 Closes the Selector.
virtual bool onWait (std::size_t msecs)
virtual void onAttach (SelectorBase &)
virtual void onDetach (SelectorBase &)
virtual size_t onBeginRead (char *buffer, size_t n, bool &eof)
virtual size_t onEndRead (bool &eof)
virtual size_t onRead (char *buffer, size_t count, bool &eof)
 Read bytes from device.
virtual size_t onBeginWrite (const char *buffer, size_t n)
virtual size_t onEndWrite ()
virtual size_t onWrite (const char *buffer, size_t count)
 Write bytes to device.
virtual void onCancel ()
- Protected Attributes inherited from cxxtools::IODevice
char * _rbuf
size_t _rbuflen
size_t _ravail
const char * _wbuf
size_t _wbuflen
size_t _wavail
void * _reserved

Constructor & Destructor Documentation

tnt::openssl_iostream::openssl_iostream ( unsigned  bufsize = 8192,
int  timeout = -1 
tnt::openssl_iostream::openssl_iostream ( const OpensslServer server,
unsigned  bufsize = 8192,
int  timeout = -1 

Member Function Documentation

int tnt::openssl_iostream::getTimeout ( ) const

Reimplemented from cxxtools::net::TcpSocket.

void tnt::openssl_iostream::setTimeout ( int  timeout)

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