ゴミ箱
write.hpp
Go to the documentation of this file.
1 //
2 // Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com)
3 //
4 // Distributed under the Boost Software License, Version 1.0. (See accompanying
5 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6 //
7 // Official repository: https://github.com/boostorg/beast
8 //
9 
10 #ifndef BOOST_BEAST_HTTP_WRITE_HPP
11 #define BOOST_BEAST_HTTP_WRITE_HPP
12 
13 #include <boost/beast/config.hpp>
23 #include <iosfwd>
24 #include <limits>
25 #include <memory>
26 #include <type_traits>
27 #include <utility>
28 
29 namespace boost {
30 namespace beast {
31 namespace http {
32 
67 template<
68  class SyncWriteStream,
69  bool isRequest, class Body, class Fields>
70 std::size_t
72  SyncWriteStream& stream,
73  serializer<isRequest, Body, Fields>& sr);
74 
109 template<
110  class SyncWriteStream,
111  bool isRequest, class Body, class Fields>
112 std::size_t
113 write_some(
114  SyncWriteStream& stream,
115  serializer<isRequest, Body, Fields>& sr,
116  error_code& ec);
117 
165 template<
166  class AsyncWriteStream,
167  bool isRequest, class Body, class Fields,
168  class WriteHandler>
169 #if BOOST_BEAST_DOXYGEN
170  void_or_deduced
171 #else
173  WriteHandler,
174  void(error_code, std::size_t)>
175 #endif
177  AsyncWriteStream& stream,
178  serializer<isRequest, Body, Fields>& sr,
179  WriteHandler&& handler);
180 
181 //------------------------------------------------------------------------------
182 
210 template<
211  class SyncWriteStream,
212  bool isRequest, class Body, class Fields>
213 std::size_t
215  SyncWriteStream& stream,
216  serializer<isRequest, Body, Fields>& sr);
217 
245 template<
246  class SyncWriteStream,
247  bool isRequest, class Body, class Fields>
248 std::size_t
250  SyncWriteStream& stream,
251  serializer<isRequest, Body, Fields>& sr,
252  error_code& ec);
253 
294 template<
295  class AsyncWriteStream,
296  bool isRequest, class Body, class Fields,
297  class WriteHandler>
298 #if BOOST_BEAST_DOXYGEN
299  void_or_deduced
300 #else
302  WriteHandler,
303  void(error_code, std::size_t)>
304 #endif
306  AsyncWriteStream& stream,
307  serializer<isRequest, Body, Fields>& sr,
308  WriteHandler&& handler);
309 
310 //------------------------------------------------------------------------------
311 
336 template<
337  class SyncWriteStream,
338  bool isRequest, class Body, class Fields>
339 std::size_t
340 write(
341  SyncWriteStream& stream,
342  serializer<isRequest, Body, Fields>& sr);
343 
368 template<
369  class SyncWriteStream,
370  bool isRequest, class Body, class Fields>
371 std::size_t
372 write(
373  SyncWriteStream& stream,
374  serializer<isRequest, Body, Fields>& sr,
375  error_code& ec);
376 
414 template<
415  class AsyncWriteStream,
416  bool isRequest, class Body, class Fields,
417  class WriteHandler>
418 #if BOOST_BEAST_DOXYGEN
419  void_or_deduced
420 #else
422  WriteHandler,
423  void(error_code, std::size_t)>
424 #endif
426  AsyncWriteStream& stream,
427  serializer<isRequest, Body, Fields>& sr,
428  WriteHandler&& handler);
429 
430 //------------------------------------------------------------------------------
431 
458 template<
459  class SyncWriteStream,
460  bool isRequest, class Body, class Fields>
461 std::size_t
462 write(
463  SyncWriteStream& stream,
464  message<isRequest, Body, Fields> const& msg);
465 
492 template<
493  class SyncWriteStream,
494  bool isRequest, class Body, class Fields>
495 std::size_t
496 write(
497  SyncWriteStream& stream,
498  message<isRequest, Body, Fields> const& msg,
499  error_code& ec);
500 
541 template<
542  class AsyncWriteStream,
543  bool isRequest, class Body, class Fields,
544  class WriteHandler>
546  WriteHandler,
547  void(error_code, std::size_t)>
549  AsyncWriteStream& stream,
550  message<isRequest, Body, Fields>& msg,
551  WriteHandler&& handler);
552 
553 //------------------------------------------------------------------------------
554 
564 template<bool isRequest, class Fields>
567  header<isRequest, Fields> const& msg);
568 
581 template<bool isRequest, class Body, class Fields>
584  message<isRequest, Body, Fields> const& msg);
585 
586 } // http
587 } // beast
588 } // boost
589 
591 
592 #endif
StreamHandler WriteHandler
Definition: type_traits.hpp:357
std::ostream & operator<<(std::ostream &os, message< isRequest, basic_file_body< File >, Fields > const &msg)=delete
Definition: async_result.hpp:20
detail::ostream_helper< DynamicBuffer, char, std::char_traits< char >, detail::basic_streambuf_movable::value > ostream(DynamicBuffer &buffer)
Definition: ostream.hpp:91
std::size_t write(SyncWriteStream &stream, serializer< isRequest, Body, Fields > &sr)
Definition: write.ipp:684
std::size_t write_header(SyncWriteStream &stream, serializer< isRequest, Body, Fields > &sr)
Definition: write.ipp:590
async_return_type< WriteHandler, void(error_code, std::size_t)> async_write(AsyncWriteStream &stream, serializer< isRequest, Body, Fields > &sr, WriteHandler &&handler)
Definition: write.ipp:730
Definition: beast_common.hpp:6
std::size_t write_some(SyncWriteStream &stream, serializer< isRequest, Body, Fields > &sr)
Definition: write.ipp:525
boost::system::error_code error_code
The type of error code used by the library.
Definition: error.hpp:21
async_return_type< WriteHandler, void(error_code, std::size_t)> async_write_some(AsyncWriteStream &stream, serializer< isRequest, Body, Fields > &sr, WriteHandler &&handler)
Definition: write.ipp:568
typename beast::async_result< typename std::decay< CompletionToken >::type, Signature >::return_type async_return_type
Definition: async_result.hpp:204
async_return_type< WriteHandler, void(error_code, std::size_t)> async_write_header(AsyncWriteStream &stream, serializer< isRequest, Body, Fields > &sr, WriteHandler &&handler)
Definition: write.ipp:652