From: "MarKol" <markol4@wp.pl>
To: <linux-kernel@vger.kernel.org>
Subject: Re: select for UNIX sockets?
Date: Mon, 9 Jun 2003 18:46:40 +0200 [thread overview]
Message-ID: <000c01c32ea6$b3c88e60$010110ac@uran238> (raw)
In-Reply-To: MDEHLPKNGKAHNMBLJOLKMEOBDHAA.davids@webmaster.com
Hi
----- Original Message -----
From: "David Schwartz" <davids@webmaster.com>
> Suppose, for example, a machine has two network interfaces. One is
very
> busy, queue full, and one is totally idle, queue empty. What do you
think
> 'select' for write on an unconnected UDP socket should do?
There is an internal buffer for this UDP socket. Select() should depend
on it's state.
I heard that SO_SNDLOWAT i SO_RCVLOWAT might be useful in this approach,
but it is not implemented in Linux.
Moreover my example uses AF_UNIX socket and AFAIK this should be
reliable communication.
I don't know why are you taking about network interfaces in this
context?
This quotation is taken from man select:
"
Three independent sets of descriptors are watched. Those
listed in readfds will be watched to see if characters
become available for reading (more precisely, to see if a
read will not block - in particular, a file descriptor is
also ready on end-of-file), those in writefds will be
watched to see if a write will not block, and those in
exceptfds will be watched for exceptions."
and this from man socket:
" Socket creates an endpoint for communication and returns a
descriptor. "
I'm aware of the fact that my english is rather poor, but I see that
socket returns a descriptor, and select is watching descriptors and
returns descriptors ready for writing if a write operation will not
block.
I would agree with you if my program wouldn't work on Solaris or QNX.
But it works on both and it looks consistent with man!
Regards
--
Marek Kolacz
next prev parent reply other threads:[~2003-06-09 16:29 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-06-06 12:20 select for UNIX sockets? MarKol
2003-06-07 0:14 ` David Schwartz
2003-06-08 0:04 ` Krzysztof Halasa
2003-06-09 3:11 ` David Schwartz
2003-06-09 17:18 ` Krzysztof Halasa
2003-06-09 17:55 ` David Schwartz
2003-06-09 22:24 ` Krzysztof Halasa
2003-06-10 13:34 ` Timothy Miller
2003-06-10 13:52 ` Richard B. Johnson
2003-06-10 14:21 ` Krzysztof Halasa
2003-06-10 19:04 ` Jesse Pollard
2003-06-11 21:55 ` Krzysztof Halasa
2003-06-11 22:50 ` David Schwartz
2003-06-11 12:51 ` Edgar Toernig
2003-06-10 21:40 ` David Schwartz
2003-06-11 22:04 ` Krzysztof Halasa
2003-06-09 23:45 ` James Stevenson
2003-06-08 4:15 ` Chris Friesen
2003-06-09 3:05 ` David Schwartz
2003-06-09 16:46 ` MarKol [this message]
2003-06-09 17:05 ` David Schwartz
-- strict thread matches above, loose matches on Subject: below --
2003-06-04 12:19 Petr Vandrovec
2003-06-06 0:28 ` Valdis.Kletnieks
2003-06-06 0:38 ` Petr Vandrovec
2003-06-03 0:08 Krzysztof Halasa
2003-06-03 14:51 ` Alan Cox
2003-06-04 23:27 ` Krzysztof Halasa
2003-06-05 13:17 ` Krzysztof Halasa
2003-06-04 11:55 ` Jesse Pollard
2003-06-04 12:42 ` Krzysztof Halasa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='000c01c32ea6$b3c88e60$010110ac@uran238' \
--to=markol4@wp.pl \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox