binding of sockets in 4.2BSD
Keith Packard
keith at reed.UUCP
Sun May 12 17:23:42 AEST 1985
In article <177 at greipa.UUCP> jordan at greipa.UUCP (Jordan K. Hubbard) writes:
>
> 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..
Actually, this is still useful, even in unix domain. This is because
sockets are I-nodes. So, you can link upto 32767 different names to the
same socket. I found this very useful for a window manager I wrote for
my tektronix 4105 terminal. It's main job was to sit in the background
reading from sockets and displaying stuff all over the screen. Now, when
time came to connect to another window (socket) I thought I would have
to accept connections on another socket so that I could tell which
window (socket) had been selected. But, the socket code does all of
this for me by passing the name used to connect to the socket back
to me. This was just great! I now have the window manager accepting
connections on one socket and, when connection is made, reading input
on the socket created upon connection. And, all of these windows have
ascii names - I ended up putting these names into a cute little box at
the top of the window; that way I know whats going on.
>
>
> Jordan K. Hubbard
> @ Genstar Rental Electronics.
> Palo Alto, CA.
> {sun, decwrl, dual}!twg!greipa!jordan
>
Keith Packard
...!tektronix!azure!keithp (work)
...!tektronix!reed!motel6!keithp (home)
"Sorry, no cute ending - we ran out of funding at the last moment"
More information about the Comp.unix
mailing list