Tuesday, January 23, 2024

Asynchronous write()/send()?

Hi,
I'm writing a program that uses sockets, and am facing a problem where I think some threads block on a send() forever. I thought I could solve this by using an asynchronous write, and setting a timeout, but I cannot find anything about this on OpenBSD. Is this just not available? I installed the POSIX manpages and I can see aio stuff there, but it tells me to include a header that gcc and clang won't find. Apparently FreeBSD has aio_write(), but seemingly OpenBSD doesn't. What are the alternatives? Is there really no way to do this?

Best,
illegalcoding

No comments:

Post a Comment