3#include <randolf/rsocket>
7 /*======================================================================*//**
9 Internal structure that @ref rsocket_mux uses to store @ref rsocket objects
10 with their intended fds/fd_set relations. The vector that this structure is
11 used to generate fds tables.
13 @author Randolf Richardson
16 - 2022-Dec-24 v1.00 Initial version
17 - 2025-Feb-03 v1.00 Increased use of references and pointers
18 *///=========================================================================
19 struct rsocket_mux_fds {
20 /// Pointer to instantiated rsocket object
22 /// Flags for intended fd_set array relations (e.g., @c POLLIN, @c POLLOUT, @c POLLERR, etc.)
25 /*======================================================================*//**
27 Built-in comparison operator used by @c std::set for ordering rsocket objects
28 by their underlying socket descriptors because this is what is needed for
29 internal muxing by POSIX's @c select(), @c poll(), etc. functions.
30 @returns Underlying socket handle
31 *///=========================================================================
33 /// This rsocket_mux_fds structure
34 const rsocket_mux_fds& rmf) const {
35 return r->get_socket_fd() < rmf.r->get_socket_fd();
38 }; // -x- struct rsocket_mux_fds -x-
40}; // -x- namespace randolf -x-