Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

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 Methods

 ~ACE_SSL_SOCK (void)
 Default destructor. More...

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 Methods

 ACE_SSL_SOCK (void)
 Default constructor is private to prevent instances of this class from being defined. More...


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 49 of file SSL_SOCK.h.


Constructor & Destructor Documentation

ACE_SSL_SOCK::~ACE_SSL_SOCK void   
 

Default destructor.

Definition at line 22 of file SSL_SOCK.cpp.

References ACE_TRACE.

00023 {
00024   ACE_TRACE ("ACE_SSL_SOCK::~ACE_SSL_SOCK");
00025 }

ACE_SSL_SOCK::ACE_SSL_SOCK void    [protected]
 

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


Member Function Documentation

ASYS_INLINE 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 19 of file SSL_SOCK.i.

References ACE_OS::ioctl.

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

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 50 of file SSL_SOCK.cpp.

References ACE_CLOEXEC, ACE_NONBLOCK, ACE_SIGIO, ACE_SIGURG, ACE_TRACE, ACE_IPC_SAP::disable, and SIGIO.

Referenced by ACE_SSL_SOCK_Connector::ssl_connect.

00051 {
00052   ACE_TRACE("ACE_SSL_SOCK::disable");
00053   switch (value)
00054     {
00055 #ifdef SIGURG
00056     case SIGURG:
00057     case ACE_SIGURG:
00058 #endif  /* SIGURG */
00059     case SIGIO:
00060     case ACE_SIGIO:
00061     case ACE_CLOEXEC:
00062       ACE_NOTSUP_RETURN (-1);
00063     case ACE_NONBLOCK:
00064       return ACE_IPC_SAP::disable (value);
00065     default:
00066       return -1;
00067     }
00068 }

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 28 of file SSL_SOCK.cpp.

References ACE_CLOEXEC, ACE_NONBLOCK, ACE_SIGIO, ACE_SIGURG, ACE_TRACE, ACE_IPC_SAP::enable, and SIGIO.

00029 {
00030   ACE_TRACE ("ACE_SSL_SOCK::enable");
00031 
00032   switch (value)
00033     {
00034 #ifdef SIGURG
00035     case SIGURG:
00036     case ACE_SIGURG:
00037 #endif  /* SIGURG */
00038     case SIGIO:
00039     case ACE_SIGIO:
00040     case ACE_CLOEXEC:
00041       ACE_NOTSUP_RETURN (-1);
00042     case ACE_NONBLOCK:
00043       return ACE_IPC_SAP::enable (value);
00044     default:
00045       return -1;
00046     }
00047 }

ASYS_INLINE 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 11 of file SSL_SOCK.i.

References ACE_IPC_SAP::get_handle.

Referenced by ACE_SSL_SOCK_Stream::close, ACE_SSL_SOCK_Connector::connect, ACE_SSL_SOCK_Stream::get_remote_addr, ACE_SSL_SOCK_Stream::recv_i, ACE_SSL_SOCK_Acceptor::ssl_accept, and ACE_SSL_SOCK_Connector::ssl_connect.

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

ASYS_INLINE 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 47 of file SSL_SOCK.i.

References ACE_OS::getsockopt.

00051 {
00052 //  switch (option)
00053 //    {
00054 //     case SO_SNDBUF:
00055 //       return ::BIO_get_write_buffer_size (this->io_bio_, *((int *) optval));
00056 //     case SO_RCVCBUF:
00057 //       return ::BIO_get_read_buffer_size (this->io_bio_, *((int *) optval));
00058 //    default:
00059       return ACE_OS::getsockopt (this->get_handle (),
00060                                  level, 
00061                                  option, (char *) optval,
00062                                  optlen);
00063 //    }
00064 }

ASYS_INLINE void ACE_SSL_SOCK::set_handle ACE_HANDLE   
 

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 5 of file SSL_SOCK.i.

References ACE_IPC_SAP::set_handle.

Referenced by ACE_SSL_SOCK_Acceptor::ACE_SSL_SOCK_Acceptor, ACE_SSL_SOCK_Acceptor::close, ACE_SSL_SOCK_Acceptor::open, and ACE_SSL_SOCK_Stream::set_handle.

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

ASYS_INLINE 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 25 of file SSL_SOCK.i.

References ACE_OS::setsockopt.

00029 {
00030 //   switch (option)
00031 //     {
00032 //     case SO_SNDBUF:
00033 //       return ::BIO_set_write_buffer_size (this->io_bio_, *((int *) optval));
00034 //     case SO_RCVCBUF:
00035 //       return ::BIO_set_read_buffer_size (this->io_bio_, *((int *) optval));
00036 //     default:
00037       return ACE_OS::setsockopt (this->get_handle (),
00038                                  level, 
00039                                  option, (char *) optval,
00040                                  optlen);
00041 //    }
00042 }


The documentation for this class was generated from the following files:
Generated on Mon Jun 16 13:16:17 2003 for ACE_SSL by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002