Posts on rottenbloghttps://blog.rottenwheel.com/posts/Recent content in Posts on rottenblogHugoen-usSat, 05 Oct 2024 00:00:00 +0000testinghttps://blog.rottenwheel.com/posts/testing/Sat, 05 Oct 2024 00:00:00 +0000https://blog.rottenwheel.com/posts/testing/<p>Check, check&hellip; <em>1&hellip; 2&hellip; 3&hellip;</em> Over.</p>Example posthttps://blog.rottenwheel.com/posts/post-1/Fri, 28 Jan 2022 03:00:00 +0300https://blog.rottenwheel.com/posts/post-1/<p>What you need to do is:</p> <ol> <li>Create the sockets.</li> <li>Add the sockets to the set (<code>FD_SET</code>).</li> <li>Find the socket with the highest file descriptor for calls to select().</li> </ol> <p>Above also works with different type sockets (e.g. <code>AF_INET</code>, <code>AF_INET6</code>). It even works if you have different type sockets (e.g. one IPv4 and one IPv6) listening on the same port number. Dual stack sockets are a thing but this approach is more flexible.</p>