Re: Open() UNIX socket = socket() + connect() ?

Mike Jagdis (mike@roan.co.uk)
Wed, 17 Dec 1997 14:54:23 +0000 (GMT/BST)


On Tue, 16 Dec 1997, Felix Schroeter wrote:

> >> What would be against it to handle an open() of a UNIX domain socket like
> >> a socket() / connect() pair ? Any pros/cons? Do other UNIXes do this?
>
> >iBCS does :-).
>
> > Whether it is a good idea or not is another question. iBCS does
> >it to make things work for foreign programs but off hand I can't
> >remember if this is because other systems really do let you open
> >Unix domain sockets.
>
> BSD does not support open() on UNIX domain sockets, either.

I remember now. iBCS does it because when you have STREAMS based
transports names really do map directly to transport end points
and a t_open() call really does do an open() with the expectation
of ending up with an actual connection. In theory you could write
programs for STREAMS based systems that do their on open() but
that would be relying on undocumented and potentially incorrect
behaviour. It doesn't seem reasonable to support such code :-).

Mike

-- 
.----------------------------------------------------------------------.
|  Mike Jagdis                  |  Internet:  mailto:mike@roan.co.uk   |
|  Roan Technology Ltd.         |                                      |
|  54A Peach Street, Wokingham  |  Telephone:  +44 118 989 0403        |
|  RG40 1XG, ENGLAND            |  Fax:        +44 118 989 1195        |
`----------------------------------------------------------------------'