Networking Forums

Networking Forums > Computer Networking > Linux Networking > What blocks a write to a socket pair?

Reply
Thread Tools Display Modes

What blocks a write to a socket pair?

 
 
Joe
Guest
Posts: n/a

 
      07-19-2006, 03:08 PM
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

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
'Twisted pair' question Scott Broadband 21 06-28-2009 04:00 PM
W2K8: socket connect blocks when there is no listener Daniel Weber Windows Networking 0 06-19-2009 10:31 AM
How to trace a pair? BJH Broadband 5 05-16-2008 08:31 PM
NEED HELP Socket programming : HOW read and write with timeout TF Linux Networking 2 10-13-2005 02:12 PM
simultaneous read & write on socket fd Dirk Petera Linux Networking 0 09-15-2003 12:52 PM



1 2 3 4 5 6 7 8 9 10 11