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

jbaldwin / libcoro / 21869175972

10 Feb 2026 02:36PM UTC coverage: 86.12%. First build
21869175972

Pull #436

github

web-flow
Merge 499b97527 into 95524de1d
Pull Request #436: Read/Write API

85 of 127 new or added lines in 7 files covered. (66.93%)

1880 of 2183 relevant lines covered (86.12%)

4576944.85 hits per line

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

42.11
/src/net/tcp/server.cpp
1
#include "coro/net/tcp/server.hpp"
2

3
#include "coro/scheduler.hpp"
4

5
namespace coro::net::tcp
6
{
7
server::server(std::unique_ptr<coro::scheduler>& scheduler, const net::socket_address& endpoint, options opts)
19✔
8
    : m_scheduler(scheduler.get()),
19✔
9
      m_options(std::move(opts)),
19✔
10
      m_accept_socket(
19✔
11
          net::make_accept_socket(
12
              net::socket::options{socket::type_t::tcp, net::socket::blocking_t::no}, endpoint, m_options.backlog))
38✔
13
{
14
    if (m_scheduler == nullptr)
19✔
15
    {
16
        throw std::runtime_error{"tcp::server cannot have a nullptr scheduler"};
1✔
17
    }
18
}
20✔
19

20
server::server(server&& other)
×
21
    : m_scheduler(std::exchange(other.m_scheduler, nullptr)),
×
22
      m_options(std::move(other.m_options)),
×
23
      m_accept_socket(std::move(other.m_accept_socket))
×
24
{
25
}
×
26

27
auto server::operator=(server&& other) -> server&
×
28
{
29
    if (std::addressof(other) != this)
×
30
    {
NEW
31
        m_scheduler     = std::exchange(other.m_scheduler, nullptr);
×
32
        m_options       = std::move(other.m_options);
×
33
        m_accept_socket = std::move(other.m_accept_socket);
×
34
    }
35
    return *this;
×
36
}
37

38
} // namespace coro::net::tcp
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

© 2026 Coveralls, Inc