Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!infonode!ingr!b11!kiick From: kiick@b11.ingr.com (chris kiick) Newsgroups: comp.unix.internals Subject: Re: Named pipes or UNIX domain sockets? Message-ID: <1991Jun17.132002.24644@b11.ingr.com> Date: 17 Jun 91 13:20:02 GMT References: <1991Jun15.225020.17655@ms.uky.edu> Organization: Intergraph Corp. Huntsville, AL Lines: 29 sean@ms.uky.edu (Sean Casey) writes: >Okay so I'm writing an application where two dissimilar processes need ... >- 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. You can open a FIFO with the N_DELAY flag set, and it will return an error code if there isn't anything on the other end. I myself am more comfortable with FIFO's, because they act more like regular files, but that's just my experience. >Anyone care to share experiences with the relative merits of the two? >Sean >-- >** Sean Casey *********************************************************** Chris J. Kiick | work phone: (205) 730-6171 Programmer at Large | Email: ingr!b11!flinx!kiick "Ideas for sale, Cheap!" | ***********************************************************