0.00% Lines (0/0)
0.00% Functions (0/0)
| TLA | Baseline | Branch | ||||||
|---|---|---|---|---|---|---|---|---|
| Line | Hits | Code | Line | Hits | 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 | - | #elif BOOST_COROSIO_HAS_IOCP | ||||||
| 17 | - | #include <winsock2.h> | ||||||
| 18 | - | #ifndef AF_UNIX | ||||||
| 19 | - | #define AF_UNIX 1 | ||||||
| 20 | - | #endif | ||||||
| 21 | - | #endif | ||||||
| 22 | - | |||||||
| 23 | - | namespace boost::corosio { | ||||||
| 24 | - | |||||||
| 25 | - | int | ||||||
| DCB | 26 | - | 139 | local_stream::family() noexcept | ||||
| 27 | - | { | ||||||
| 28 | - | #if BOOST_COROSIO_POSIX || BOOST_COROSIO_HAS_IOCP | ||||||
| DCB | 29 | - | 139 | return AF_UNIX; | ||||
| 30 | - | #else | ||||||
| 31 | - | return 0; | ||||||
| 32 | - | #endif | ||||||
| 33 | - | } | ||||||
| 34 | - | |||||||
| 35 | - | int | ||||||
| DCB | 36 | - | 139 | local_stream::type() noexcept | ||||
| 37 | - | { | ||||||
| 38 | - | #if BOOST_COROSIO_POSIX || BOOST_COROSIO_HAS_IOCP | ||||||
| DCB | 39 | - | 139 | return SOCK_STREAM; | ||||
| 40 | - | #else | ||||||
| 41 | - | return 0; | ||||||
| 42 | - | #endif | ||||||
| 43 | - | } | ||||||
| 44 | - | |||||||
| 45 | - | int | ||||||
| DCB | 46 | - | 139 | local_stream::protocol() noexcept | ||||
| 47 | - | { | ||||||
| DCB | 48 | - | 139 | return 0; | ||||
| 49 | - | } | ||||||
| 50 | - | |||||||
| 51 | - | } // namespace boost::corosio | ||||||