Document return values
[ACE_TAO.git] / ACE / ace / SSL / SSL_SOCK.h
blob2f0f534c7ba6b16ee91d0635d4f6718c03afcd36
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file SSL_SOCK.h
7 * @author Ossama Othman <ossama@ece.uci.edu>
8 */
9 //=============================================================================
12 #ifndef ACE_SSL_SOCK_H
13 #define ACE_SSL_SOCK_H
15 #include /**/ "ace/pre.h"
17 #include "SSL_Export.h"
19 #if !defined (ACE_LACKS_PRAGMA_ONCE)
20 # pragma once
21 #endif /* ACE_LACKS_PRAGMA_ONCE */
23 #include "ace/SOCK.h"
25 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
27 /**
28 * @class ACE_SSL_SOCK
30 * @brief An abstract class that forms the basis for more specific
31 * classes, such as "ACE_SSL_SOCK_Acceptor" and
32 * "ACE_SSL_SOCK_Stream". Do not instantiate this class.
34 * This class provides functions that are common to all of the
35 * ACE_SSL_SOCK_* classes. ACE_SSL_SOCK provides the ability
36 * to get and set socket options, get the local and remote
37 * addresses, and close the socket.
39 class ACE_SSL_Export ACE_SSL_SOCK : public ACE_SOCK
41 public:
42 /**
43 * Override ACE_SOCK base class implementations with these SSL
44 * specific ones.
46 //@{
47 int set_option (int level,
48 int option,
49 void *optval,
50 int optlen) const;
51 int get_option (int level,
52 int option,
53 void *optval,
54 int *optlen) const;
55 int enable (int value) const;
56 int disable (int value) const;
57 void set_handle (ACE_HANDLE);
58 ACE_HANDLE get_handle () const;
59 int control (int cmd, void *arg) const;
60 //@}
62 protected:
63 /// Default constructor is private to prevent instances of this class
64 /// from being defined.
65 ACE_SSL_SOCK ();
67 /// Destructor
68 /**
69 * Not a virtual destructor. Protected destructor to prevent
70 * operator delete() from being called through a base class
71 * ACE_SSL_SOCK pointer/reference.
73 ~ACE_SSL_SOCK ();
76 ACE_END_VERSIONED_NAMESPACE_DECL
78 #if defined (__ACE_INLINE__)
79 #include "SSL_SOCK.inl"
80 #endif /* __ACE_INLINE__ */
82 #include /**/ "ace/post.h"
84 #endif /* ACE_SSL_SOCK_H */