|
| | UdpSocket ()=default |
| |
| | UdpSocket (int fd) noexcept |
| |
| | ~UdpSocket () |
| |
| | UdpSocket (const UdpSocket &)=delete |
| |
| UdpSocket & | operator= (const UdpSocket &)=delete |
| |
| | UdpSocket (UdpSocket &&o) noexcept |
| |
| UdpSocket & | operator= (UdpSocket &&o) noexcept |
| |
| int | bind (const SockAddr &addr) noexcept |
| |
| int | connect (const SockAddr &addr) noexcept |
| |
| int | set_reuseaddr (bool on) noexcept |
| |
| int | set_rcvbuf (int bytes) noexcept |
| | SO_RCVBUFFORCE (CAP_NET_ADMIN), falling back to SO_RCVBUF, which net.core.rmem_max caps.
|
| |
| int | rcvbuf () const noexcept |
| |
| int | set_sndbuf (int bytes) noexcept |
| |
| int | join_group (std::uint32_t group_be, const McastInterface &ifc) noexcept |
| | IP_ADD_MEMBERSHIP (any source) and source-specific membership (IP_ADD_SOURCE_MEMBERSHIP for an interface address, MCAST_JOIN_SOURCE_GROUP for an index).
|
| |
| int | join_source_group (std::uint32_t group_be, std::uint32_t source_be, const McastInterface &ifc) noexcept |
| |
| int | set_multicast_all (bool on) noexcept |
| | IP_MULTICAST_ALL: off delivers only the groups this socket joined.
|
| |
| int | set_multicast_if (const McastInterface &ifc) noexcept |
| |
| int | set_multicast_ttl (int ttl) noexcept |
| |
| int | set_multicast_loop (bool on) noexcept |
| |
| int | enable_rx_timestamps () noexcept |
| | SO_TIMESTAMPING with RX_SOFTWARE | SOFTWARE | RX_HARDWARE | RAW_HARDWARE.
|
| |
| int | set_busy_poll (int usec) noexcept |
| | SO_BUSY_POLL (µs), SO_PREFER_BUSY_POLL and SO_BUSY_POLL_BUDGET (both Linux 5.11).
|
| |
| int | set_prefer_busy_poll (bool on) noexcept |
| |
| int | set_busy_poll_budget (int packets) noexcept |
| |
| IoResult | recv_from (std::span< std::byte > buf, SockAddr *from=nullptr) noexcept |
| | One datagram.
|
| |
| IoResult | send_to (std::span< const std::byte > buf, const SockAddr &to) noexcept |
| |
| IoResult | send (std::span< const std::byte > buf) noexcept |
| |
| int | recv_batch (std::span< mmsghdr > msgs) noexcept |
| | recvmmsg / sendmmsg without blocking: messages transferred, 0 when the socket would block, or -errno.
|
| |
| int | send_batch (std::span< mmsghdr > msgs) noexcept |
| |
| std::optional< SockAddr > | local_addr () const noexcept |
| |
| void | close () noexcept |
| |
| int | release () noexcept |
| |
| int | fd () const noexcept |
| |
| bool | valid () const noexcept |
| |
| int | last_error () const noexcept |
| |
| int fastmm::net::UdpSocket::set_busy_poll |
( |
int |
usec | ) |
|
|
noexcept |
SO_BUSY_POLL (µs), SO_PREFER_BUSY_POLL and SO_BUSY_POLL_BUDGET (both Linux 5.11).
Each returns the setsockopt errno and changes nothing on failure: -EPERM without CAP_NET_ADMIN in the initial namespace (SO_BUSY_POLL above the current value before Linux 6.4, enabling SO_PREFER_BUSY_POLL, raising SO_BUSY_POLL_BUDGET), -ENOPROTOOPT on older kernels.