Closed
Description
Is your feature request related to a problem? Please describe.
Multiple users (including me) have fallen in to this trap. Getting a UdpSocket
from some other libraries and forget to set it as non-blocking can hang the runtime in a way that is not easy to debug (especially for beginners).
Describe the solution you'd like
Some checks that ensures that the socket being passed in is indeed non-blocking. This is doable in Linux with fnctl
, but I'm not sure about the status on Windows.
Such check can be designed so that it only preforms in debug mode, as extra syscalls are usually involved.
Ideally, this should trigger a panic if the check fails, but an error is better than nothing.