Thanks for the patch! Other than a couple of style nitpicks it looks good.
I could have looped the `recv()` call to collect all of the response, but that felt more complicated than adding a minor delay. The tests were verified against Windows 11 Pro (build 22621.3880).
I think it'd still be preferable, though. 100 ms isn't a lot, but those kinds of sleeps can build up, and we do want our tests to be as quick as possible. Perhaps more concerningly, if the timing is particularly bad, and 100 ms isn't enough, we'll get intermittent failures.