ゴミ箱
read.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_READ_HPP
11 #define BOOST_BEAST_HTTP_READ_HPP
12 
13 #include <boost/beast/config.hpp>
18 
19 namespace boost {
20 namespace beast {
21 namespace http {
22 
66 template<
67  class SyncReadStream,
68  class DynamicBuffer,
69  bool isRequest, class Derived>
70 std::size_t
71 read_some(
72  SyncReadStream& stream,
73  DynamicBuffer& buffer,
74  basic_parser<isRequest, Derived>& parser);
75 
123 template<
124  class SyncReadStream,
125  class DynamicBuffer,
126  bool isRequest, class Derived>
127 std::size_t
128 read_some(
129  SyncReadStream& stream,
130  DynamicBuffer& buffer,
131  basic_parser<isRequest, Derived>& parser,
132  error_code& ec);
133 
195 template<
196  class AsyncReadStream,
197  class DynamicBuffer,
198  bool isRequest, class Derived,
199  class ReadHandler>
200 #if BOOST_BEAST_DOXYGEN
201  void_or_deduced
202 #else
204  ReadHandler, void(error_code, std::size_t)>
205 #endif
207  AsyncReadStream& stream,
208  DynamicBuffer& buffer,
209  basic_parser<isRequest, Derived>& parser,
210  ReadHandler&& handler);
211 
212 //------------------------------------------------------------------------------
213 
259 template<
260  class SyncReadStream,
261  class DynamicBuffer,
262  bool isRequest, class Derived>
263 std::size_t
265  SyncReadStream& stream,
266  DynamicBuffer& buffer,
267  basic_parser<isRequest, Derived>& parser);
268 
314 template<
315  class SyncReadStream,
316  class DynamicBuffer,
317  bool isRequest, class Derived>
318 std::size_t
320  SyncReadStream& stream,
321  DynamicBuffer& buffer,
322  basic_parser<isRequest, Derived>& parser,
323  error_code& ec);
324 
383 template<
384  class AsyncReadStream,
385  class DynamicBuffer,
386  bool isRequest, class Derived,
387  class ReadHandler>
388 #if BOOST_BEAST_DOXYGEN
389  void_or_deduced
390 #else
392  ReadHandler, void(error_code, std::size_t)>
393 #endif
395  AsyncReadStream& stream,
396  DynamicBuffer& buffer,
397  basic_parser<isRequest, Derived>& parser,
398  ReadHandler&& handler);
399 
400 //------------------------------------------------------------------------------
401 
447 template<
448  class SyncReadStream,
449  class DynamicBuffer,
450  bool isRequest, class Derived>
451 std::size_t
452 read(
453  SyncReadStream& stream,
454  DynamicBuffer& buffer,
455  basic_parser<isRequest, Derived>& parser);
456 
502 template<
503  class SyncReadStream,
504  class DynamicBuffer,
505  bool isRequest, class Derived>
506 std::size_t
507 read(
508  SyncReadStream& stream,
509  DynamicBuffer& buffer,
510  basic_parser<isRequest, Derived>& parser,
511  error_code& ec);
512 
571 template<
572  class AsyncReadStream,
573  class DynamicBuffer,
574  bool isRequest, class Derived,
575  class ReadHandler>
576 #if BOOST_BEAST_DOXYGEN
577  void_or_deduced
578 #else
580  ReadHandler,
581  void(error_code, std::size_t)>
582 #endif
583 async_read(
584  AsyncReadStream& stream,
585  DynamicBuffer& buffer,
586  basic_parser<isRequest, Derived>& parser,
587  ReadHandler&& handler);
588 
589 //------------------------------------------------------------------------------
590 
635 template<
636  class SyncReadStream,
637  class DynamicBuffer,
638  bool isRequest, class Body, class Allocator>
639 std::size_t
640 read(
641  SyncReadStream& stream,
642  DynamicBuffer& buffer,
643  message<isRequest, Body, basic_fields<Allocator>>& msg);
644 
689 template<
690  class SyncReadStream,
691  class DynamicBuffer,
692  bool isRequest, class Body, class Allocator>
693 std::size_t
694 read(
695  SyncReadStream& stream,
696  DynamicBuffer& buffer,
697  message<isRequest, Body, basic_fields<Allocator>>& msg,
698  error_code& ec);
699 
759 template<
760  class AsyncReadStream,
761  class DynamicBuffer,
762  bool isRequest, class Body, class Allocator,
763  class ReadHandler>
764 #if BOOST_BEAST_DOXYGEN
765  void_or_deduced
766 #else
768  ReadHandler,
769  void(error_code, std::size_t)>
770 #endif
771 async_read(
772  AsyncReadStream& stream,
773  DynamicBuffer& buffer,
774  message<isRequest, Body, basic_fields<Allocator>>& msg,
775  ReadHandler&& handler);
776 
777 } // http
778 } // beast
779 } // boost
780 
782 
783 #endif
StreamHandler ReadHandler
Definition: type_traits.hpp:356
Definition: async_result.hpp:20
async_return_type< ReadHandler, void(error_code, std::size_t)> async_read_header(AsyncReadStream &stream, DynamicBuffer &buffer, basic_parser< isRequest, Derived > &parser, ReadHandler &&handler)
Definition: read.ipp:630
async_return_type< ReadHandler, void(error_code, std::size_t)> async_read_some(AsyncReadStream &stream, DynamicBuffer &buffer, basic_parser< isRequest, Derived > &parser, ReadHandler &&handler)
Definition: read.ipp:546
Definition: beast_common.hpp:6
boost::system::error_code error_code
The type of error code used by the library.
Definition: error.hpp:21
std::size_t read(SyncReadStream &stream, DynamicBuffer &buffer, basic_parser< isRequest, Derived > &parser)
Definition: read.ipp:657
std::size_t read_some(SyncReadStream &stream, DynamicBuffer &buffer, basic_parser< isRequest, Derived > &parser)
Definition: read.ipp:454
async_return_type< ReadHandler, void(error_code, std::size_t)> async_read(AsyncReadStream &stream, DynamicBuffer &buffer, basic_parser< isRequest, Derived > &parser, ReadHandler &&handler)
Definition: read.ipp:715
typename beast::async_result< typename std::decay< CompletionToken >::type, Signature >::return_type async_return_type
Definition: async_result.hpp:204
std::size_t read_header(SyncReadStream &stream, DynamicBuffer &buffer, basic_parser< isRequest, Derived > &parser)
Definition: read.ipp:572