LCOV - code coverage report
Current view: top level - libs/http_proto/src/sink.cpp (source / functions) Coverage Total Hit
Test: coverage_filtered.info Lines: 100.0 % 13 13
Test Date: 2025-10-27 13:02:03 Functions: 100.0 % 1 1

            Line data    Source code
       1              : //
       2              : // Copyright (c) 2023 Vinnie Falco (vinnie.falco@gmail.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/cppalliance/http_proto
       8              : //
       9              : 
      10              : #include <boost/http_proto/sink.hpp>
      11              : 
      12              : namespace boost {
      13              : namespace http_proto {
      14              : 
      15              : auto
      16        18441 : sink::
      17              : on_write(
      18              :     boost::span<buffers::const_buffer const> bs,
      19              :     bool more) ->
      20              :         results
      21              : {
      22        18441 :     auto it = bs.begin();
      23        18441 :     auto const end_ = bs.end();
      24        18441 :     results rv;
      25        18441 :     if(it == end_)
      26            1 :         return rv;
      27              :     do
      28              :     {
      29        36881 :         buffers::const_buffer b(*it++);
      30        36881 :         rv += on_write(
      31              :             b,
      32        73762 :             it != end_ || more);
      33        36881 :         if(rv.ec.failed())
      34            3 :             return rv;
      35              :     }
      36        36878 :     while(it != end_);
      37        18437 :     return rv;
      38              : }
      39              : 
      40              : } // http_proto
      41              : } // boost
        

Generated by: LCOV version 2.1