#include <filedescriptor.h>
Public Types | |
typedef ConexusPointer < FileDescriptor > | pointer |
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 |
typedef ConexusPointer<FileDescriptor> Conexus::NSPR::FileDescriptor::pointer |
Reimplemented from Conexus::Endpoint.
Reimplemented in Conexus::NSPR::File, Conexus::NSPR::Socket, Conexus::NSPR::TCP, Conexus::NSPR::UDP, and Conexus::NSS::SSLSocket.
Conexus::NSPR::FileDescriptor::FileDescriptor | ( | PRFileDesc * | fd = NULL , |
|
bool | close_on_destruct = true | |||
) | [protected] |
Conexus::NSPR::FileDescriptor::~FileDescriptor | ( | ) | [virtual] |
References close(), Conexus::Endpoint::is_open(), and Conexus::Endpoint::m_close_on_destruct.
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] |
size_t Conexus::NSPR::FileDescriptor::input_available | ( | ) | throw () [virtual] |
Data Conexus::NSPR::FileDescriptor::read_data | ( | size_t | size, | |
Timeout | timeout | |||
) | throw ( read_exception ) [protected, virtual] |
Implements Endpoint::read_data().
Implements Conexus::Endpoint.
Reimplemented in Conexus::NSPR::Socket.
References Conexus::Data::resize(), Conexus::Data::set_current_time(), Conexus::Data::size(), and Conexus::throw_read_exception().
Referenced by Conexus::NSPR::Socket::read_data(), and Conexus::NSPR::File::read_data().
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.
Implements Conexus::Endpoint.
Reimplemented in Conexus::NSPR::Socket, Conexus::NSPR::TCP, and Conexus::NSPR::UDP.
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().