src/corosio/src/local_stream.cpp

100.0% Lines (6/6) 100.0% List of functions (3/3)
local_stream.cpp
f(x) Functions (3)
Line TLA Hits Source Code
1 //
2 // Copyright (c) 2026 Michael Vandeberg
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/corosio
8 //
9
10 #include <boost/corosio/local_stream.hpp>
11 #include <boost/corosio/detail/platform.hpp>
12
13 #if BOOST_COROSIO_POSIX
14 #include <sys/socket.h>
15 #include <sys/un.h>
16 #endif
17
18 namespace boost::corosio {
19
20 int
21 20x local_stream::family() noexcept
22 {
23 #if BOOST_COROSIO_POSIX
24 20x return AF_UNIX;
25 #else
26 return 0;
27 #endif
28 }
29
30 int
31 20x local_stream::type() noexcept
32 {
33 #if BOOST_COROSIO_POSIX
34 20x return SOCK_STREAM;
35 #else
36 return 0;
37 #endif
38 }
39
40 int
41 20x local_stream::protocol() noexcept
42 {
43 20x return 0;
44 }
45
46 } // namespace boost::corosio
47