* 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.

> And another question: is it possible to find out that such a socket has
> been disconnected before I call writev() on it (so that I reconnect it first)?
> Or will I have to check for EPIPE? (too bad - because then I won't know
> how many bytes have been transmitted successfully)

writev() returning 0 means connection closed.

-- 
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)

Reply via email to