|
|
|
|
|
|
| Author |
Message |
Joe *nix forums Guru Wannabe
Joined: 04 Mar 2005
Posts: 214
|
Posted: Wed Jul 19, 2006 3:08 pm Post subject:
What blocks a write to a socket pair?
|
|
|
I've set up a bunch of socketpairs and they're being used to
communicate between a collection of threads. These socketpairs are
generally non-blocking - I'd rather lose my message than block up a
thread. They are also currently set up as SOCK_STREAM, rather than
SOCK_DGRAM. Using getsockopt I find that the buffers are 65535 in size
as expected and I can't see how I could be filling that buffer - unless
the one buffer is shared between ALL socketpairs in a process. I'm
running (and have to stay on) kernel 2.4.19 and glibc 2.1.2.
Now to some questions!
What will cause a socketpair to block (or report that it would have
blocked) a write?
Is it possible for the write to only write part of the data or will
this not ever happen in practice?
Would SOCK_DGRAM alleviate some of these issues given that I am
essentially using the socketpair as a message queue?
And no, I can't switch to the more traditional methods for a message
queue :-(
Many thanks,
Joe |
|
| Back to top |
|
 |
Google
|
|
| Back to top |
|
 |
|
|
The time now is Thu Dec 04, 2008 4:16 am | All times are GMT
|
|
Internet Advertising | Mortgage Calculator | Mortgage Calculator | Credit Cards | Mortgage Loans
|
|
Copyright © 2004-2005 DeniX Solutions SRL
|
|
|
|
Other DeniX Solutions sites:
Unix/Linux blog |
electronics forum |
medicine forum |
science forum |
|
|
Privacy Policy
|
Powered by phpBB © 2001, 2005 phpBB Group
|
|