Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site greipa.UUCP Path: utzoo!utcs!lsuc!pesnta!greipa!jordan From: jordan@greipa.UUCP (Jordan K. Hubbard) Newsgroups: net.unix-wizards Subject: AF_UNIX domain socket question. Message-ID: <213@greipa.UUCP> Date: Tue, 28-May-85 04:00:00 EDT Article-I.D.: greipa.213 Posted: Tue May 28 04:00:00 1985 Date-Received: Wed, 29-May-85 03:27:14 EDT Reply-To: jordan@greipa.UUCP (Jordan K. Hubbard) Organization: Genstar Rental Electronics, Palo Alto, Ca. Lines: 37 [ Also posted to su.unix.wizards ] Hi. Can several processes write to a unix-domain stream socket at the same time and preserve the 'atomic' nature of each call? (say two processes wrote out a 7 byte structure to the same socket, could this become garbaged?) Should I be using datagram sockets? Even more important to this discussion, can several processes write to a socket without 'connecting' to it? I.E. calling socket and binding the descriptor to an existing socket (unix file) then reading/ writing directly to the socket without calling connect. The reason being that I need to server to go into a read wait on a socket for data that could come from several processes at different times. I'd like to give each process its own socket in the usual way, but that means I'd have to go into an accept wait, and I want to be able to respond to data sent by earlier processes more or less immediately. (The number of processes communicating with the same server is arbitrary, but they're all related and need to access one set of data known to the server) If there's a decent way of doing this and I'm too thick/ignorant to realize it, I'd welcome any suggestions.. Thanks. -- Jordan K. Hubbard @ Genstar Rental Electronics. Palo Alto, CA. {pesnta, decwrl, dual, pyramid}!greipa!jordan "Ack ack!". - William the feline