* Henning Brauer <[EMAIL PROTECTED]> [2006-02-23 15:11]: > * Alexander Farber <[EMAIL PROTECTED]> [2006-02-21 16:59]: > > do I need to retry writev() on a nonblocking Unix-domain SOCK_STREAM > > socket or will it always write out the exact number of bytes I wanted? > > it will tell you wether it wrote out both. > on non-blocking sockets you have to account for partial reads.
wow, two errors in two sentences. let me try again. it will tell you wether it wrote out everything. on non-blocking sockets you have to account for partial writes. also I suggest reading usr.sbin/bgpd/buffer.c, especially buf_write (using write) and msgbuf_write (using sendmsg, but logic is teh same). -- BS Web Services, http://www.bsws.de/ OpenBSD-based Webhosting, Mail Services, Managed Servers, ... Unix is very simple, but it takes a genius to understand the simplicity. (Dennis Ritchie)

