LCOV - code coverage report
Current view: top level - libs/http_proto/src/source.cpp (source / functions) Coverage Total Hit
Test: coverage_filtered.info Lines: 100.0 % 14 14
Test Date: 2024-08-25 18:42:41 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/buffers
       8              : //
       9              : 
      10              : #include <boost/http_proto/source.hpp>
      11              : #include <boost/buffers/mutable_buffer.hpp>
      12              : #include <boost/assert.hpp>
      13              : 
      14              : namespace boost {
      15              : namespace http_proto {
      16              : 
      17              : auto
      18         5495 : source::
      19              : on_read(
      20              :     buffers::mutable_buffer_span bs) ->
      21              :         results
      22              : {
      23         5495 :     results rv;
      24         5495 :     auto it = bs.begin();
      25         5495 :     auto const end_ = bs.end();
      26         5495 :     if(it == end_)
      27            1 :         return rv;
      28              :     do
      29              :     {
      30        10967 :         buffers::mutable_buffer b(*it++);
      31        10967 :         rv += on_read(b);
      32        10967 :         if(rv.ec.failed())
      33            3 :             return rv;
      34        10964 :         if(rv.finished)
      35           23 :             break;
      36              :     }
      37        10941 :     while(it != end_);
      38         5491 :     return rv;
      39              : }
      40              : 
      41              : } // http_proto
      42              : } // boost
        

Generated by: LCOV version 2.1