From: Ian Collins on
On 04/ 3/10 10:03 AM, Rainer Weikusat wrote:
> scott(a)slp53.sl.home (Scott Lurndal) writes:
>> Rainer Weikusat<rweikusat(a)mssgmbh.com> writes:
>>> Doug McIntyre<merlyn(a)geeks.org> writes:
>>>> "Bill Cunningham"<nospam(a)nspam.invalid> writes:
>>>>> "Rick Jones"<rick.jones2(a)hp.com> wrote:
>>>>
>>>>>> Do definitely get either Unix Network Programming or some similar
>>>>>> work. It will be invaluable.
>>>>
>>>>> I'm just afraid that it will talk only about AF_UNIX and not get into
>>>>> internet networking. I understand there is a differenct in unix socket used
>>>>> internally by the machine and internet communication.
>>>>
>>>> There's very little use of AF_UNIX compared to AF_INET in the real
>>>> world,
>>>
>>> PF_UNIX sockets are the preferable method for IPC on a single
>>> system. Also, the socket API itself is not tied to either protocol or
>>> address families.
>>
>> preferable by whom?
>
> People who understand IPC.

Certainly not those who use Solaris.

--
Ian Collins
From: Bill Cunningham on

"Rainer Weikusat" <rweikusat(a)mssgmbh.com> wrote in message
news:87pr2hk21e.fsf(a)fever.mssgmbh.com...
> "Bill Cunningham" <nospam(a)nspam.invalid> writes:
>> "Rainer Weikusat" <rweikusat(a)mssgmbh.com> wrote in message
>>> I tried to point out the difference between a declaration and an
>>> operation.
>>
>> In your example you used 0 as the 3rd argument. Should I have
>> done that?
>
> Simple answer: Yes.
>
> Complicated answer: The third argument to 'socket' is a protocol
> number (see /etc/protocols for a list). Using '0' means 'chose the
> default'. For PF_INET SOCK_DGRAM sockets, this is UDP, and for
> SOCK_STREAM socket, TCP.
>
>> Or should I leave the port numbers the way they are?
>
> Port numbers belong to transport layer socket addresses. They are part
> of the input for connect(2) or bind(2).

Ok that helps alot.

Bill


From: Bill Cunningham on
Oh and btw I'm doing all this on a linux machine. I am hoping linux is
unix compliant. Atleast the networking API.

Bill


From: Jens Thoms Toerring on
Bill Cunningham <nospam(a)nspam.invalid> wrote:
> Well this is what I have so far. I believe I'm doing this right.

Complete BS as usual.

Please guys, this guy is just a troll. Since about 5 years he's
been constantly posting the most idiotic questions in a number
of groups, pretending not to learn a single bit from all the
replies he got - but then he starts with a new "project" again
and again: I have seen him claim to be writing his own file-
system or even starting to write a new kernel while, at the
other hand, he's not even able to write a working three-line
C program (see comp.lang.c where he spend the last few weeks).
Interestingly, the one thing he seems to have figured out is
how to change his (munged) email address to get out of my (and
probably other peoples) killfiles. I rest my case.

Regards, Jens
--
\ Jens Thoms Toerring ___ jt(a)toerring.de
\__________________________ http://toerring.de
From: Bill Cunningham on

"Rick Jones" <rick.jones2(a)hp.com> wrote in message
news:hp5l98$vtc$2(a)usenet01.boi.hp.com...

> and don't forget the error checking...

Right. Everything I've seen so far is -1 for error.

Bill