Imported Upstream version 1.72.0
[platform/upstream/boost.git] / boost / beast / core / buffered_read_stream.hpp
index 66cd561..2d86a63 100644 (file)
@@ -261,10 +261,15 @@ public:
         this function. Invocation of the handler will be performed in a
         manner equivalent to using `net::post`.
     */
-    template<class MutableBufferSequence, class ReadHandler>
+    template<
+        class MutableBufferSequence,
+        BOOST_BEAST_ASYNC_TPARAM2 ReadHandler =
+            net::default_completion_token_t<executor_type>>
     BOOST_BEAST_ASYNC_RESULT2(ReadHandler)
-    async_read_some(MutableBufferSequence const& buffers,
-        ReadHandler&& handler);
+    async_read_some(
+        MutableBufferSequence const& buffers,
+        ReadHandler&& handler =
+            net::default_completion_token_t<executor_type>{});
 
     /** Write some data to the stream.
 
@@ -335,10 +340,15 @@ public:
         this function. Invocation of the handler will be performed in a
         manner equivalent to using `net::post`.
     */
-    template<class ConstBufferSequence, class WriteHandler>
+    template<
+        class ConstBufferSequence,
+        BOOST_BEAST_ASYNC_TPARAM2 WriteHandler =
+            net::default_completion_token_t<executor_type>>
     BOOST_BEAST_ASYNC_RESULT2(WriteHandler)
-    async_write_some(ConstBufferSequence const& buffers,
-        WriteHandler&& handler);
+    async_write_some(
+        ConstBufferSequence const& buffers,
+        WriteHandler&& handler =
+            net::default_completion_token_t<executor_type>{});
 };
 
 } // beast