🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.unix.internals
Article #2532

Named pipes or UNIX domain sockets?

#2532
From: Sean Casey
Date: Sat, 15 Jun 1991 22:50
23 lines
1281 bytes
Okay so I'm writing an application where two dissimilar processes need
to shove pieces of data at each other in a non-blocking fashion.
Process A talks to processes B, C, and D in a star fashion. Any of
these processes can be restarted if necessary.

I could do one of the following:

- FIFOs, which are likely to be the most efficient implementation, but
  which might be less portable than sockets. But there's POSIX...

- UNIX domain sockets, which are (IMHO) a little funkier to set up.
  But I'm comfy with sockets so that's no real trouble.

One thing I noticed is that when a program opens a named pipe, and
there's nothing else that has it open, then it just blocks
indefinitely, while a UNIX domain socket will get the connection
refused if there's nothing to listen.

Anyone care to share experiences with the relative merits of the two?

Sean
-- 
** Sean Casey  <sean@s.ms.uky.edu>
Technical Details
Message-ID: <1991Jun15.225020.17655@ms.uky.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!cs.utexas.edu!asuvax!ukma!sean

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!cs.utexas.edu!asuvax!ukma!sean
From: sean@ms.uky.edu (Sean Casey)
Newsgroups: comp.unix.internals
Subject: Named pipes or UNIX domain sockets?
Message-ID: <1991Jun15.225020.17655@ms.uky.edu>
Date: 15 Jun 91 22:50:20 GMT
Organization: The Leaning Tower of Patterson Office @ The Univ. of KY
Lines: 23