00001 // $Id: SSL_Proxy_Connector.h 91118 2010-07-17 10:29:57Z mcorino $ 00002 00003 /** 00004 * @file SSL_Proxy_Connector.h 00005 * 00006 * @author Martin Corino <mcorino@remedy.nl> 00007 */ 00008 00009 #ifndef ACE_SSL_PROXY_CONNECTOR_H 00010 #define ACE_SSL_PROXY_CONNECTOR_H 00011 00012 #include /**/ "ace/pre.h" 00013 00014 #include "ace/SSL/SSL_SOCK_Stream.h" 00015 #include "ace/Time_Value.h" 00016 00017 ACE_BEGIN_VERSIONED_NAMESPACE_DECL 00018 00019 namespace ACE 00020 { 00021 namespace INet 00022 { 00023 /** 00024 * @class ACE_INet_SSL_Proxy_Connector 00025 * 00026 * @brief Provides the functionality to attach an SSL_SOCK_Stream 00027 * to an established socket of a proxy tunneling service. 00028 * 00029 * The <connect> method will finalize the setting up an SSL connection 00030 * over the tunnel by performing an SSL handhake after setting the socket 00031 * in the @c SSL_SOCK_Stream. 00032 */ 00033 class SSL_Proxy_Connector 00034 { 00035 public: 00036 SSL_Proxy_Connector (); 00037 ~SSL_Proxy_Connector (); 00038 00039 /** 00040 * Actively connect to an already connected proxy peer, producing a 00041 * connected @c ACE_SSL_SOCK_Stream object if the connection succeeds. 00042 * This method uses the provided connection (socket) handle to initialize 00043 * the @c ACE_SSL_SOCK_Stream object and than finalizes the connection 00044 * by performing the SSL handshake. 00045 */ 00046 int connect (ACE_SSL_SOCK_Stream& new_stream, 00047 ACE_HANDLE proxy_handle, 00048 const ACE_Time_Value *timeout = 0); 00049 protected: 00050 /// Complete non-blocking SSL active connection. 00051 int ssl_connect (ACE_SSL_SOCK_Stream &new_stream, 00052 const ACE_Time_Value *timeout); 00053 }; 00054 } 00055 } 00056 00057 ACE_END_VERSIONED_NAMESPACE_DECL 00058 00059 #include /**/ "ace/post.h" 00060 #endif /* ACE_SSL_PROXY_CONNECTOR_H */