Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.unix.programmer > #1047

Re: Unix Domain Socket

From Rainer Weikusat <rweikusat@mssgmbh.com>
Newsgroups comp.unix.programmer
Subject Re: Unix Domain Socket
Date 2011-08-02 12:21 +0100
Message-ID <87r554hxd6.fsf@sapphire.mobileactivedefense.com> (permalink)
References <56566d5a-ab99-4729-b8b3-e9a294b38e0a@j14g2000prn.googlegroups.com> <pan.2011.08.02.02.52.20.69000@nowhere.com>

Show all headers | View raw


Nobody <nobody@nowhere.com> writes:
> On Mon, 01 Aug 2011 06:50:39 -0700, noneinwind wrote:
>
>> Hello, I've seen an example on the Internet about Unix Domain Socket.
>> It says, "Different from network socket program, Unix Domain Socket
>> client generally calls bind explicitly, rather than use address
>> assigned automaticlly by the system. Binding to a specified socekt
>> file containing client's pid, we can distinguish clients from each
>> other."
>
> I don't know where you read that, but I wouldn't put much faith in it.
>
> Unix-domain client sockets are normally unnamed; there is usually no
> reason for the client end to have a name.
>
> Unlike TCP/IP sockets, where each end always has a port number, and an
> ephemeral port is allocated by the OS if none is chosen explicitly,
> Unix-domain sockets don't have to be named. E.g. with socketpair(), both
> sockets are unnamed; as they are connected from the outset, there is no
> need for names.

AF_UNIX datagram sockets are different from AF_INET datagram sockets
in that (at least on Linux) no usuable 'default address' exists:
Provided that such a socket is supposed to receive anything, an
address needs to be bound to it.

Back to comp.unix.programmer | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

Unix Domain Socket noneinwind <warmyouth@gmail.com> - 2011-08-01 06:50 -0700
  Re: Unix Domain Socket Volker Birk <bumens@dingens.org> - 2011-08-01 15:14 +0000
    Re: Unix Domain Socket noneinwind <warmyouth@gmail.com> - 2011-08-02 05:44 -0700
      Re: Unix Domain Socket Ben Bacarisse <ben.usenet@bsb.me.uk> - 2011-08-02 14:21 +0100
    Re: Unix Domain Socket wy <warmyouth@gmail.com> - 2011-08-03 19:35 -0700
      Re: Unix Domain Socket Rainer Weikusat <rweikusat@mssgmbh.com> - 2011-08-04 12:15 +0100
  Re: Unix Domain Socket Nobody <nobody@nowhere.com> - 2011-08-02 03:52 +0100
    Re: Unix Domain Socket Nicolas George <nicolas$george@salle-s.org> - 2011-08-02 08:58 +0000
    Re: Unix Domain Socket Rainer Weikusat <rweikusat@mssgmbh.com> - 2011-08-02 12:21 +0100

csiph-web