src/corosio/src/local_datagram.cpp
100.0% Lines (6/6)
100.0% List of functions (3/3)
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_datagram.hpp> | ||
| 11 | #include <boost/corosio/detail/platform.hpp> | ||
| 12 | |||
| 13 | #if BOOST_COROSIO_POSIX | ||
| 14 | |||
| 15 | #include <sys/socket.h> | ||
| 16 | #include <sys/un.h> | ||
| 17 | |||
| 18 | namespace boost::corosio { | ||
| 19 | |||
| 20 | int | ||
| 21 | 20x | local_datagram::family() noexcept | |
| 22 | { | ||
| 23 | 20x | return AF_UNIX; | |
| 24 | } | ||
| 25 | |||
| 26 | int | ||
| 27 | 20x | local_datagram::type() noexcept | |
| 28 | { | ||
| 29 | 20x | return SOCK_DGRAM; | |
| 30 | } | ||
| 31 | |||
| 32 | int | ||
| 33 | 20x | local_datagram::protocol() noexcept | |
| 34 | { | ||
| 35 | 20x | return 0; | |
| 36 | } | ||
| 37 | |||
| 38 | } // namespace boost::corosio | ||
| 39 | |||
| 40 | #endif // BOOST_COROSIO_POSIX | ||
| 41 |