1 #ifndef ACE_IOS_SSLSOCK_IOSTREAM_CPP
2 #define ACE_IOS_SSLSOCK_IOSTREAM_CPP
4 #include "ace/INet/SSLSock_IOStream.h"
5 #include "ace/INet/IOS_util.h"
7 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
13 template <ACE_SYNCH_DECL
>
14 SSLSock_StreamBufferBase
<ACE_SYNCH_USE
>::SSLSock_StreamBufferBase (stream_type
* stream
)
15 : BidirStreamBuffer
<StreamHandler
<ACE_SSL_SOCK_Stream
, ACE_SYNCH_USE
> > (
18 std::ios::in
| std::ios::out
)
22 template <ACE_SYNCH_DECL
>
23 SSLSock_StreamBufferBase
<ACE_SYNCH_USE
>::~SSLSock_StreamBufferBase ()
27 template <ACE_SYNCH_DECL
>
28 SSLSock_IOSBase
<ACE_SYNCH_USE
>::SSLSock_IOSBase (stream_type
* stream
)
31 ace_ios_init (&this->streambuf_
);
34 template <ACE_SYNCH_DECL
>
35 SSLSock_IOSBase
<ACE_SYNCH_USE
>::~SSLSock_IOSBase ()
39 this->streambuf_
.sync();
46 template <ACE_SYNCH_DECL
>
47 typename SSLSock_IOSBase
<ACE_SYNCH_USE
>::buffer_type
*
48 SSLSock_IOSBase
<ACE_SYNCH_USE
>::rdbuf ()
50 return &this->streambuf_
;
53 template <ACE_SYNCH_DECL
>
54 void SSLSock_IOSBase
<ACE_SYNCH_USE
>::close ()
56 this->streambuf_
.sync ();
57 this->streambuf_
.close_stream ();
60 template <ACE_SYNCH_DECL
>
61 const typename SSLSock_IOSBase
<ACE_SYNCH_USE
>::stream_type
&
62 SSLSock_IOSBase
<ACE_SYNCH_USE
>::stream () const
64 return this->streambuf_
.stream ();
68 template <ACE_SYNCH_DECL
>
69 SSLSock_OStreamBase
<ACE_SYNCH_USE
>::SSLSock_OStreamBase(stream_type
* stream
)
70 : SSLSock_IOSBase
<ACE_SYNCH_USE
> (stream
), std::ostream (SSLSock_IOSBase
<ACE_SYNCH_USE
>::rdbuf ())
74 template <ACE_SYNCH_DECL
>
75 SSLSock_OStreamBase
<ACE_SYNCH_USE
>::~SSLSock_OStreamBase()
79 template <ACE_SYNCH_DECL
>
80 void SSLSock_OStreamBase
<ACE_SYNCH_USE
>::set_interceptor (
81 typename
buffer_type::interceptor_type
& interceptor
)
83 this->rdbuf ()->set_interceptor (interceptor
);
86 template <ACE_SYNCH_DECL
>
87 SSLSock_IStreamBase
<ACE_SYNCH_USE
>::SSLSock_IStreamBase(stream_type
* stream
)
88 : SSLSock_IOSBase
<ACE_SYNCH_USE
> (stream
), std::istream (SSLSock_IOSBase
<ACE_SYNCH_USE
>::rdbuf ())
92 template <ACE_SYNCH_DECL
>
93 SSLSock_IStreamBase
<ACE_SYNCH_USE
>::~SSLSock_IStreamBase ()
97 template <ACE_SYNCH_DECL
>
98 void SSLSock_IStreamBase
<ACE_SYNCH_USE
>::set_interceptor (
99 typename
buffer_type::interceptor_type
& interceptor
)
101 this->rdbuf ()->set_interceptor (interceptor
);
104 template <ACE_SYNCH_DECL
>
105 SSLSock_IOStreamBase
<ACE_SYNCH_USE
>::SSLSock_IOStreamBase(stream_type
* stream
)
106 : SSLSock_IOSBase
<ACE_SYNCH_USE
> (stream
), std::iostream (SSLSock_IOSBase
<ACE_SYNCH_USE
>::rdbuf ())
110 template <ACE_SYNCH_DECL
>
111 SSLSock_IOStreamBase
<ACE_SYNCH_USE
>::~SSLSock_IOStreamBase ()
115 template <ACE_SYNCH_DECL
>
116 void SSLSock_IOStreamBase
<ACE_SYNCH_USE
>::set_interceptor (
117 typename
buffer_type::interceptor_type
& interceptor
)
119 this->rdbuf ()->set_interceptor (interceptor
);
125 ACE_END_VERSIONED_NAMESPACE_DECL
127 #endif /* ACE_IOS_SSLSOCK_IOSTREAM_CPP */