std :: sched::io_nb
Function std::fd_set_blocking
int fd_set_blocking(int fd)Puts an already-open socket fd back into blocking mode — the inverse of fd_set_nonblocking, for callers (e.g. std::http, see std/http/http.h) that want simple synchronous request/response semantics on top of tcp_listen_nb/tcp_accept_nb/tcp_connect_nb's portable socket setup rather than pairing them with std::Reactor/std::TaskScheduler. Returns 0 on success. On a socket from tcp_connect_nb, call tcp_wait_connected first (or connect with tcp_connect_timeout instead): Darwin and Winsock fail send/recv with ENOTCONN while the handshake is still in flight instead of waiting for it.