2 * @file SSLSock_IOStream.h
4 * @author Martin Corino <mcorino@remedy.nl>
7 #ifndef ACE_IOS_SSLSOCK_IOSTREAM_H
8 #define ACE_IOS_SSLSOCK_IOSTREAM_H
10 #include /**/ "ace/pre.h"
12 #include /**/ "ace/config-all.h"
14 #if !defined (ACE_LACKS_PRAGMA_ONCE)
16 #endif /* ACE_LACKS_PRAGMA_ONCE */
18 #include "ace/SSL/SSL_SOCK_Stream.h"
19 #include "ace/INet/BidirStreamBuffer.h"
20 #include "ace/INet/StreamHandler.h"
21 #include "ace/INet/StreamInterceptor.h"
25 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
32 * @class ACE_IOS_SSLSock_StreamBuffer
37 template <ACE_SYNCH_DECL
>
38 class SSLSock_StreamBufferBase
39 : public BidirStreamBuffer
<StreamHandler
<ACE_SSL_SOCK_Stream
, ACE_SYNCH_USE
> >
42 typedef StreamHandler
<ACE_SSL_SOCK_Stream
, ACE_SYNCH_USE
> stream_type
;
44 SSLSock_StreamBufferBase (stream_type
* stream
);
45 virtual ~SSLSock_StreamBufferBase ();
55 * @class ACE_IOS_SSLSock_IOS
60 template <ACE_SYNCH_DECL
>
62 : public virtual std::ios
65 typedef SSLSock_StreamBufferBase
<ACE_SYNCH_USE
> buffer_type
;
66 typedef typename
buffer_type::stream_type stream_type
;
68 SSLSock_IOSBase (stream_type
* stream
);
71 buffer_type
* rdbuf ();
75 const stream_type
& stream () const;
78 buffer_type streambuf_
;
82 * @class ACE_IOS_SSLSock_OStream
87 template <ACE_SYNCH_DECL
>
88 class SSLSock_OStreamBase
89 : public SSLSock_IOSBase
<ACE_SYNCH_USE
>, public std::ostream
92 typedef SSLSock_IOSBase
<ACE_SYNCH_USE
> ios_base
;
93 typedef typename
ios_base::stream_type stream_type
;
94 typedef SSLSock_StreamBufferBase
<ACE_SYNCH_USE
> buffer_type
;
96 explicit SSLSock_OStreamBase(stream_type
* stream
);
99 { return ios_base::rdbuf (); }
101 ~SSLSock_OStreamBase();
103 void set_interceptor (typename
buffer_type::interceptor_type
& interceptor
);
107 * @class ACE_IOS_SSLSock_IStream
112 template <ACE_SYNCH_DECL
>
113 class SSLSock_IStreamBase
114 : public SSLSock_IOSBase
<ACE_SYNCH_USE
>, public std::istream
117 typedef SSLSock_IOSBase
<ACE_SYNCH_USE
> ios_base
;
118 typedef typename
ios_base::stream_type stream_type
;
119 typedef SSLSock_StreamBufferBase
<ACE_SYNCH_USE
> buffer_type
;
121 explicit SSLSock_IStreamBase(stream_type
* stream
);
123 buffer_type
* rdbuf ()
124 { return ios_base::rdbuf (); }
126 ~SSLSock_IStreamBase();
128 void set_interceptor (typename
buffer_type::interceptor_type
& interceptor
);
132 * @class ACE_IOS_SSLSock_IOStream
137 template <ACE_SYNCH_DECL
>
138 class SSLSock_IOStreamBase
139 : public SSLSock_IOSBase
<ACE_SYNCH_USE
>, public std::iostream
142 typedef SSLSock_IOSBase
<ACE_SYNCH_USE
> ios_base
;
143 typedef typename
ios_base::stream_type stream_type
;
144 typedef SSLSock_StreamBufferBase
<ACE_SYNCH_USE
> buffer_type
;
146 explicit SSLSock_IOStreamBase(stream_type
* stream
);
148 buffer_type
* rdbuf ()
149 { return ios_base::rdbuf (); }
151 ~SSLSock_IOStreamBase();
153 void set_interceptor (typename
buffer_type::interceptor_type
& interceptor
);
156 typedef SSLSock_StreamBufferBase
<ACE_NULL_SYNCH
> SSLSock_StreamBuffer
;
157 typedef SSLSock_IOSBase
<ACE_NULL_SYNCH
> SSLSock_IOS
;
158 typedef SSLSock_IStreamBase
<ACE_NULL_SYNCH
> SSLSock_IStream
;
159 typedef SSLSock_OStreamBase
<ACE_NULL_SYNCH
> SSLSock_OStream
;
160 typedef SSLSock_IOStreamBase
<ACE_NULL_SYNCH
> SSLSock_IOStream
;
164 ACE_END_VERSIONED_NAMESPACE_DECL
166 #include "ace/INet/SSLSock_IOStream.cpp"
168 #include /**/ "ace/post.h"
169 #endif /* ACE_IOS_SSLSOCK_IOSTREAM_H */