conexus logo

Conexus::NSPR::FileDescriptor Class Reference
[Conexus I/O Endpoints with NSPR supportConexus I/O Endpoints]

This class is the top level object for all subclasses performing I/O (Input/Output) operations via NSPR file descriptors. More...

#include <filedescriptor.h>

Inheritance diagram for Conexus::NSPR::FileDescriptor:

Inheritance graph

List of all members.

Public Types

typedef ConexusPointer
< FileDescriptor

Public Member Functions

virtual ~FileDescriptor ()
virtual PRFileDesc * fd () throw ()
 Base class method returning the raw NSPR file descriptor.
virtual void close (bool force=false) throw ( close_exception )
 Closes the Endpoint object by closing the member file descriptor.
virtual size_t input_available () throw ()

Protected Member Functions

 FileDescriptor (PRFileDesc *fd=NULL, bool close_on_destruct=true)
virtual size_t write_data (const Data data, Timeout timeout) throw ( write_exception )
 Reimplements write_data() to provide for NSPR specific calls.
virtual Data read_data (size_t size, Timeout timeout) throw ( read_exception )
 Implements Endpoint::read_data().

Protected Attributes

PRFileDesc * m_fd

Detailed Description

This class is the top level object for all subclasses performing I/O (Input/Output) operations via NSPR file descriptors.

Rick L Vinyard Jr

Member Typedef Documentation

Constructor & Destructor Documentation

Conexus::NSPR::FileDescriptor::FileDescriptor ( PRFileDesc *  fd = NULL,
bool  close_on_destruct = true 
) [protected]

Conexus::NSPR::FileDescriptor::~FileDescriptor (  )  [virtual]

Member Function Documentation

void Conexus::NSPR::FileDescriptor::close ( bool  force = false  )  throw ( close_exception ) [virtual]

Closes the Endpoint object by closing the member file descriptor.

If the object is already closed will return without attempting to close.

Implements Conexus::Endpoint.

Reimplemented in Conexus::NSPR::Socket.

Referenced by ~FileDescriptor().

PRFileDesc * Conexus::NSPR::FileDescriptor::fd (  )  throw () [virtual]

Base class method returning the raw NSPR file descriptor.

References m_fd.

size_t Conexus::NSPR::FileDescriptor::input_available (  )  throw () [virtual]

Reimplemented from Conexus::Endpoint.

Reimplemented in Conexus::NSS::SSLSocket.

References m_fd.

Data Conexus::NSPR::FileDescriptor::read_data ( size_t  size,
Timeout  timeout 
) throw ( read_exception ) [protected, virtual]

size_t Conexus::NSPR::FileDescriptor::write_data ( const Data  data,
Timeout  timeout 
) throw ( write_exception ) [protected, virtual]

Reimplements write_data() to provide for NSPR specific calls.

This method performs blocking I/O whenever timeout is zero or null. This differs from the base Conexus endpoint behavior which performs non-blocking I/O whenever timeout is zero. The reason for this change is due to the fact that NSPR does not support non-blocking I/O at the file level, as only sockets can perform non-blocking I/O in NSPR.

throw specific exceptions rather than a generic exception

Implements Conexus::Endpoint.

Reimplemented in Conexus::NSPR::Socket, Conexus::NSPR::TCP, and Conexus::NSPR::UDP.

Member Data Documentation

PRFileDesc* Conexus::NSPR::FileDescriptor::m_fd [protected]

Referenced by Conexus::NSS::SSLSocket::cipher(), Conexus::NSS::SSLSocket::configure_as_server(), Conexus::NSS::SSLSocket::enable_cipher(), fd(), Conexus::NSS::SSLSocket::force_handshake(), Conexus::NSS::SSLSocket::input_available(), input_available(), Conexus::NSS::SSLSocket::invalidate_session(), Conexus::NSS::SSLSocket::is_cipher_enabled(), Conexus::NSPR::Socket::is_non_blocking(), Conexus::NSS::SSLSocket::is_option_set(), Conexus::NSS::SSLSocket::issuer(), Conexus::NSPR::Socket::listen(), Conexus::NSS::SSLSocket::on_authenticate_certificate(), Conexus::NSPR::UDP::open(), Conexus::NSPR::TCP::open(), Conexus::NSS::SSLSocket::peer_certificate(), Conexus::NSS::SSLSocket::pkcs11_pin_arg(), Conexus::NSS::SSLSocket::rehandshake(), Conexus::NSS::SSLSocket::reset_handshake(), Conexus::NSS::SSLSocket::secret_key_size(), Conexus::NSS::SSLSocket::security_status(), Conexus::NSS::SSLSocket::session_id(), Conexus::NSS::SSLSocket::session_key_size(), Conexus::NSS::SSLSocket::set_bad_certificate_callback(), Conexus::NSS::SSLSocket::set_client_authentication_callback(), Conexus::NSS::SSLSocket::set_default_client_authentication_callback(), Conexus::NSPR::Socket::set_non_blocking(), Conexus::NSS::SSLSocket::set_option(), Conexus::NSPR::Socket::set_option(), Conexus::NSS::SSLSocket::set_peer_id(), Conexus::NSS::SSLSocket::set_pkcs11_pin_arg(), Conexus::NSS::SSLSocket::set_url(), Conexus::NSPR::TCP::shutdown(), Conexus::NSS::SSLSocket::SSLSocket(), Conexus::NSS::SSLSocket::subject(), Conexus::NSPR::TCP::TCP(), Conexus::NSS::SSLSocket::unset_bad_certificate_callback(), Conexus::NSS::SSLSocket::unset_client_authentication_callback(), and Conexus::NSS::SSLSocket::url().

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

Generated on Wed Jul 8 15:51:29 2009 for conexus by doxygen 1.5.8