writev() on a blocking Unix-domain SOCK_STREAM socket
- From: "A. Farber" <Alexander.Farber@xxxxxxxxx>
- Date: 28 Feb 2006 10:03:39 -0800
Hello,
do I need to retry writev() (or write()) on a blocking Unix-domain
SOCK_STREAM
socket or will it always write out the exact number of bytes I wanted?
I.e. I have code like this (and a similar code with writev() too):
if (write(fd, (const char *) presp, resp_size) != resp_size) {
warn("Writing %lu bytes failed\n", resp_size);
return;
}
and they seem to work, but I'm worried if they will always work
reliably.
And another question: is it possible to find out that a Unix-domain
socket has
been disconnected before I call writev() on it (so that I reconnect it
first)?
Thanks
Alex
.
- Follow-Ups:
- Re: writev() on a blocking Unix-domain SOCK_STREAM socket
- From: David Schwartz
- Re: writev() on a blocking Unix-domain SOCK_STREAM socket
- From: rohit
- Re: writev() on a blocking Unix-domain SOCK_STREAM socket
- From: rohit
- Re: writev() on a blocking Unix-domain SOCK_STREAM socket
- Prev by Date: Re: Replacing dynamic library with static one
- Next by Date: Re: writev() on a blocking Unix-domain SOCK_STREAM socket
- Previous by thread: Replacing dynamic library with static one
- Next by thread: Re: writev() on a blocking Unix-domain SOCK_STREAM socket
- Index(es):
Relevant Pages
|
|