▲ | okanat 3 days ago | |||||||
Just leave DNS out, are there any POSIX standard async functionality for networking or even normal IO? All I know by reading some libraries is epoll or io_uring used on Linux, kevent on BSDs. | ||||||||
▲ | comex 3 days ago | parent | next [-] | |||||||
Yes for networking. You set your sockets into O_NONBLOCK mode and use poll() or select(). These APIs are in POSIX and also have direct equivalents in Winsock. There is also POSIX AIO for async I/O on any file descriptor, but at least historically speaking it doesn't work properly on Linux. | ||||||||
| ||||||||
▲ | mort96 3 days ago | parent | prev [-] | |||||||
POSIX has poll for that. |