niXforums Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   PreferencesPreferences   Log in to check your private messagesLog in to check your private messages   Log inLog in 
·  nixdoc.net ·  man pages ·  Linux HOWTOs ·  FreeBSD Tips ·  Forums
navigation Forum index » *nix » Linux » networking
What blocks a write to a socket pair?
Post new topic   Reply to topic Page 1 of 1 [1 Post] View previous topic :: View next topic
Author Message
Joe
*nix forums Guru Wannabe


Joined: 04 Mar 2005
Posts: 214

PostPosted: Wed Jul 19, 2006 3:08 pm    Post subject: What blocks a write to a socket pair? Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [1 Post] View previous topic :: View next topic
The time now is Thu Dec 04, 2008 4:16 am | All times are GMT
navigation Forum index » *nix » Linux » networking
Jump to:  

Similar Topics
Topic Author Forum Replies Last Post
No new posts socket read modifies third parameter after the call: Very... jainarunk@gmail.com networking 1 Thu Jul 20, 2006 3:47 pm
No new posts Socket Sabotage Michael B Allen networking 0 Wed Jul 19, 2006 9:51 pm
No new posts Socket packet Marco C 10 Wed Jul 19, 2006 8:22 am
No new posts Help me !. Problem whit Squid 2.5 - commBind: Cannot bind... Raul Lapitzondo Squid 8 Tue Jul 18, 2006 5:07 pm
No new posts socket call does not read full content jainarunk@gmail.com networking 5 Tue Jul 18, 2006 3:27 pm

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
[ Time: 0.1006s ][ Queries: 16 (0.0389s) ][ GZIP on - Debug on ]