• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

bemanproject / net / 17103284804

11 Aug 2025 06:06PM UTC coverage: 3.39% (-0.7%) from 4.082%
17103284804

push

github

web-flow
Merge pull request #34 from bemanproject/taps-initial

Taps initial

0 of 115 new or added lines in 11 files covered. (0.0%)

28 existing lines in 5 files now uncovered.

24 of 708 relevant lines covered (3.39%)

0.51 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/include/beman/net/detail/basic_stream_socket.hpp
1
// include/beman/net/detail/basic_stream_socket.hpp                 -*-C++-*-
2
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
3

4
#ifndef INCLUDED_BEMAN_NET_DETAIL_BASIC_STREAM_SOCKET
5
#define INCLUDED_BEMAN_NET_DETAIL_BASIC_STREAM_SOCKET
6

7
// ----------------------------------------------------------------------------
8

9
#include <beman/net/detail/netfwd.hpp>
10
#include <beman/net/detail/io_context.hpp>
11
#include <beman/net/detail/basic_socket.hpp>
12
#include <functional>
13
#include <system_error>
14

15
// ----------------------------------------------------------------------------
16

17
template <typename Protocol>
18
class beman::net::basic_stream_socket : public basic_socket<Protocol> {
19
  public:
20
    using native_handle_type = ::beman::net::detail::native_handle_type;
21
    using protocol_type      = Protocol;
22
    using endpoint_type      = typename protocol_type::endpoint;
23

24
  private:
25
    endpoint_type d_endpoint;
26

27
  public:
UNCOV
28
    basic_stream_socket(basic_stream_socket&&)            = default;
×
29
    basic_stream_socket& operator=(basic_stream_socket&&) = default;
UNCOV
30
    basic_stream_socket(::beman::net::detail::context_base* context, ::beman::net::detail::socket_id id)
×
UNCOV
31
        : basic_socket<Protocol>(context, id) {}
×
32
    basic_stream_socket(::beman::net::io_context& context, const endpoint_type& endpoint)
×
33
        : beman::net::basic_socket<Protocol>(
34
              context.get_scheduler().get_context(), ::std::invoke([p = endpoint.protocol(), &context] {
×
35
                  ::std::error_code error{};
×
36
                  auto              rc(context.make_socket(p.family(), p.type(), p.protocol(), error));
×
37
                  if (error) {
×
38
                      throw ::std::system_error(error);
×
39
                  }
40
                  return rc;
×
41
              })),
42
          d_endpoint(endpoint) {}
×
43

44
    auto get_endpoint() const -> endpoint_type { return this->d_endpoint; }
×
45
};
46

47
// ----------------------------------------------------------------------------
48

49
#endif
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc