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!linus!philabs!cmcl2!seismo!harvard!talcott!panda!genrad!decvax!decwrl!greipa!jordan From: jordan@greipa.UUCP (Jordan K. Hubbard) Newsgroups: net.unix Subject: binding of sockets in 4.2BSD Message-ID: <177@greipa.UUCP> Date: Mon, 29-Apr-85 20:59:39 EDT Article-I.D.: greipa.177 Posted: Mon Apr 29 20:59:39 1985 Date-Received: Fri, 10-May-85 20:40:10 EDT Reply-To: jordan@greipa.UUCP (Jordan K. Hubbard) Organization: Genstar Rental Electronics, Palo Alto, Ca. Lines: 57 I'm confused. A little while ago I decided to write some code to test out sockets (unix domain) in a psudeo client-server configuration. I consulted the IPC primer and wrote some code that didn't work. Ok, so after consulting some existing socket-type code I found that you use sockaddr_un instead of just 'sockaddr' as claimed in the manual. This worked and I was amused. However, each time I ran the server it complained that the socket name being bound was already in use. Sure, because the socket 'file' (choke) was still there and had to be removed each time by hand. Shouldn't the close or shutdown calls do this? Once a socket has been 'bound' the binding sticks around forever? I must be missing a drastic point here because in the documentation for 'accept' it also makes a somewhat confusing statement: If the server wishes to find out who its client is, it may supply a buffer for the client socket's name. Now is this only useful for the internet domain? Under the unix domain it just returns the the name the server bound because the client had to use the same name to talk to it. Sounds kind of useless.. As an aside, the IPC primer seems to lack a few things in the way of explanation though it's a heck of a lot better than nothing at all. Can anyone steer me in the direction of more in-depth coverage of this topic? Handy hints gratefully accepted! --- Jordan K. Hubbard @ Genstar Rental Electronics. Palo Alto, CA. {sun, decwrl, dual}!twg!greipa!jordan This CPU's dead! "Er, no it's not. It's just in a wait state (holds down reset switch) Look! It just executed an instruction!" It did not! You cycled the power! "No I didn't! It's just pausing for I/O!"