Protected Member Functions

ACE_SSL_SOCK Class Reference

An abstract class that forms the basis for more specific classes, such as "ACE_SSL_SOCK_Acceptor" and "ACE_SSL_SOCK_Stream". Do not instantiate this class. More...

#include <SSL_SOCK.h>

Inheritance diagram for ACE_SSL_SOCK:
Inheritance graph
[legend]
Collaboration diagram for ACE_SSL_SOCK:
Collaboration graph
[legend]

List of all members.

Public Member Functions

int set_option (int level, int option, void *optval, int optlen) const
int get_option (int level, int option, void *optval, int *optlen) const
int enable (int value) const
int disable (int value) const
void set_handle (ACE_HANDLE)
ACE_HANDLE get_handle (void) const
int control (int cmd, void *arg) const

Protected Member Functions

 ACE_SSL_SOCK (void)
 ~ACE_SSL_SOCK (void)
 Destructor.

Detailed Description

An abstract class that forms the basis for more specific classes, such as "ACE_SSL_SOCK_Acceptor" and "ACE_SSL_SOCK_Stream". Do not instantiate this class.

This class provides functions that are common to all of the ACE_SSL_SOCK_* classes. ACE_SSL_SOCK provides the ability to get and set socket options, get the local and remote addresses, and close the socket.

Definition at line 51 of file SSL_SOCK.h.


Constructor & Destructor Documentation

ACE_SSL_SOCK::ACE_SSL_SOCK ( void   )  [protected]

Default constructor is private to prevent instances of this class from being defined.

ACE_SSL_SOCK::~ACE_SSL_SOCK ( void   )  [protected]

Destructor.

Not a virtual destructor. Protected destructor to prevent operator delete() from being called through a base class ACE_SSL_SOCK pointer/reference.

Definition at line 24 of file SSL_SOCK.cpp.

{
  ACE_TRACE ("ACE_SSL_SOCK::~ACE_SSL_SOCK");
}


Member Function Documentation

int ACE_SSL_SOCK::control ( int  cmd,
void *  arg 
) const

Override ACE_SOCK base class implementations with these SSL specific ones.

Reimplemented from ACE_IPC_SAP.

Definition at line 24 of file SSL_SOCK.inl.

{
  return ACE_OS::ioctl (this->get_handle (), cmd, arg);
}

int ACE_SSL_SOCK::disable ( int  value  )  const

Override ACE_SOCK base class implementations with these SSL specific ones.

Reimplemented from ACE_IPC_SAP.

Definition at line 52 of file SSL_SOCK.cpp.

{
  ACE_TRACE("ACE_SSL_SOCK::disable");
  switch (value)
    {
#ifdef SIGURG
    case SIGURG:
    case ACE_SIGURG:
#endif  /* SIGURG */
    case SIGIO:
    case ACE_SIGIO:
    case ACE_CLOEXEC:
      ACE_NOTSUP_RETURN (-1);
    case ACE_NONBLOCK:
      return ACE_IPC_SAP::disable (value);
    default:
      return -1;
    }
}

int ACE_SSL_SOCK::enable ( int  value  )  const

Override ACE_SOCK base class implementations with these SSL specific ones.

Reimplemented from ACE_IPC_SAP.

Definition at line 30 of file SSL_SOCK.cpp.

{
  ACE_TRACE ("ACE_SSL_SOCK::enable");

  switch (value)
    {
#ifdef SIGURG
    case SIGURG:
    case ACE_SIGURG:
#endif  /* SIGURG */
    case SIGIO:
    case ACE_SIGIO:
    case ACE_CLOEXEC:
      ACE_NOTSUP_RETURN (-1);
    case ACE_NONBLOCK:
      return ACE_IPC_SAP::enable (value);
    default:
      return -1;
    }
}

ACE_HANDLE ACE_SSL_SOCK::get_handle ( void   )  const

Override ACE_SOCK base class implementations with these SSL specific ones.

Reimplemented from ACE_IPC_SAP.

Definition at line 16 of file SSL_SOCK.inl.

{
  // return this->ssl_ ? (ACE_HANDLE) ::SSL_get_fd (this->ssl_) : ACE_INVALID_HANDLE;
  return this->ACE_SOCK::get_handle ();
}

int ACE_SSL_SOCK::get_option ( int  level,
int  option,
void *  optval,
int *  optlen 
) const

Override ACE_SOCK base class implementations with these SSL specific ones.

Reimplemented from ACE_SOCK.

Definition at line 52 of file SSL_SOCK.inl.

{
//  switch (option)
//    {
//     case SO_SNDBUF:
//       return ::BIO_get_write_buffer_size (this->io_bio_, *((int *) optval));
//     case SO_RCVCBUF:
//       return ::BIO_get_read_buffer_size (this->io_bio_, *((int *) optval));
//    default:
      return ACE_OS::getsockopt (this->get_handle (),
                                 level,
                                 option, (char *) optval,
                                 optlen);
//    }
}

void ACE_SSL_SOCK::set_handle ( ACE_HANDLE  fd  ) 

Override ACE_SOCK base class implementations with these SSL specific ones.

Reimplemented from ACE_IPC_SAP.

Reimplemented in ACE_SSL_SOCK_Stream.

Definition at line 10 of file SSL_SOCK.inl.

{
  this->ACE_SOCK::set_handle (fd);
}

int ACE_SSL_SOCK::set_option ( int  level,
int  option,
void *  optval,
int  optlen 
) const

Override ACE_SOCK base class implementations with these SSL specific ones.

Reimplemented from ACE_SOCK.

Definition at line 30 of file SSL_SOCK.inl.

{
//   switch (option)
//     {
//     case SO_SNDBUF:
//       return ::BIO_set_write_buffer_size (this->io_bio_, *((int *) optval));
//     case SO_RCVCBUF:
//       return ::BIO_set_read_buffer_size (this->io_bio_, *((int *) optval));
//     default:
      return ACE_OS::setsockopt (this->get_handle (),
                                 level,
                                 option, (char *) optval,
                                 optlen);
//    }
}


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines