defined(GENERATING_DOCUMENTATION)
| 136 | template <typename Protocol, typename Clock, typename WaitTraits> |
| 137 | #endif // defined(GENERATING_DOCUMENTATION) |
| 138 | class basic_socket_streambuf |
| 139 | : public std::streambuf, |
| 140 | private detail::socket_streambuf_io_context, |
| 141 | private detail::socket_streambuf_buffers, |
| 142 | #if defined(ASIO_NO_DEPRECATED) || defined(GENERATING_DOCUMENTATION) |
| 143 | private basic_socket<Protocol> |
| 144 | #else // defined(ASIO_NO_DEPRECATED) || defined(GENERATING_DOCUMENTATION) |
| 145 | public basic_socket<Protocol> |
| 146 | #endif // defined(ASIO_NO_DEPRECATED) || defined(GENERATING_DOCUMENTATION) |
| 147 | { |
| 148 | private: |
| 149 | // These typedefs are intended keep this class's implementation independent |
| 150 | // of whether it's using Boost.DateClock, Boost.Chrono or std::chrono. |
| 151 | #if defined(ASIO_HAS_BOOST_DATE_TIME) \ |
| 152 | && defined(ASIO_USE_BOOST_DATE_TIME_FOR_SOCKET_IOSTREAM) |
| 153 | typedef WaitTraits traits_helper; |
| 154 | #else // defined(ASIO_HAS_BOOST_DATE_TIME) |
| 155 | // && defined(ASIO_USE_BOOST_DATE_TIME_FOR_SOCKET_IOSTREAM) |
| 156 | typedef detail::chrono_time_traits<Clock, WaitTraits> traits_helper; |
| 157 | #endif // defined(ASIO_HAS_BOOST_DATE_TIME) |
| 158 | // && defined(ASIO_USE_BOOST_DATE_TIME_FOR_SOCKET_IOSTREAM) |
| 159 | |
| 160 | public: |
| 161 | /// The protocol type. |
| 162 | typedef Protocol protocol_type; |
| 163 | |
| 164 | /// The endpoint type. |
| 165 | typedef typename Protocol::endpoint endpoint_type; |
| 166 | |
| 167 | /// The clock type. |
| 168 | typedef Clock clock_type; |
| 169 | |
| 170 | #if defined(GENERATING_DOCUMENTATION) |
| 171 | /// (Deprecated: Use time_point.) The time type. |
| 172 | typedef typename WaitTraits::time_type time_type; |
| 173 | |
| 174 | /// The time type. |
| 175 | typedef typename WaitTraits::time_point time_point; |
| 176 | |
| 177 | /// (Deprecated: Use duration.) The duration type. |
| 178 | typedef typename WaitTraits::duration_type duration_type; |
| 179 | |
| 180 | /// The duration type. |
| 181 | typedef typename WaitTraits::duration duration; |
| 182 | #else |
| 183 | # if !defined(ASIO_NO_DEPRECATED) |
| 184 | typedef typename traits_helper::time_type time_type; |
| 185 | typedef typename traits_helper::duration_type duration_type; |
| 186 | # endif // !defined(ASIO_NO_DEPRECATED) |
| 187 | typedef typename traits_helper::time_type time_point; |
| 188 | typedef typename traits_helper::duration_type duration; |
| 189 | #endif |
| 190 | |
| 191 | /// Construct a basic_socket_streambuf without establishing a connection. |
| 192 | basic_socket_streambuf() |
| 193 | : detail::socket_streambuf_io_context(new io_context), |
| 194 | basic_socket<Protocol>(*default_io_context_), |
| 195 | expiry_time_(max_expiry_time()) |
nothing calls this directly
no test coverage detected