IPC and networking

  • Follow


    What would be the easiest way to start learning *nix IPC and networkg? 
Pipes, message qeues, or perhaps unix packets or anything else?

Bill


0
Reply nospam116 (1187) 3/27/2012 8:38:18 PM

On Tuesday 27 March 2012 16:38, in comp.unix.programmer,
nospam@nspam.invalid wrote:

>     What would be the easiest way to start learning *nix IPC and networkg?
> Pipes, message qeues, or perhaps unix packets or anything else?

I'd say to start with a good book, and work from there. Understanding what
each of those communications facilities are, and how to properly work with
them is the key to writing application code that uses those communications
tools.

I'd suggest
  "Unix Network Programming Volume 1 (Networking API's: Sockets and XTI)"
  by W. Richard Stevens
  (Prentice-Hall Publising, ISBN 0-13-490012-X)
and
  "Unix Network Programming Volume 2 (Interprocess Communications)"
  by W. Richard Stevens
  (Prentice-Hall Publising, ISBN 0-13-081081-9)

They both include clear descriptions and explanations of a wide variety of
Unix communications choices, and provide source code examples in C.

HTH
-- 
Lew Pitcher

0
Reply lpitcher2 (869) 3/27/2012 9:31:14 PM


In article <4f72253a$0$15142$bbae4d71@news.suddenlink.net>,
 "Bill Cunningham" <nospam@nspam.invalid> wrote:

>     What would be the easiest way to start learning *nix IPC and networkg? 
> Pipes, message qeues, or perhaps unix packets or anything else?
> 
> Bill

The books "Unix Network Programming" by W. Richard Stevens.  They're 
over a dozen years old, so some things may be a little out of date, but 
they're probably still one of the best overviews.  We lost a great 
author when he died.

-- 
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
0
Reply barmar (5664) 3/28/2012 7:22:28 AM

Bill Cunningham <nospam@nspam.invalid> wrote:

>    What would be the easiest way to start learning *nix IPC and networkg? 
> Pipes, message qeues, or perhaps unix packets or anything else?

Check out Beej's Guides: http://beej.us/guide/

-- 
Gof
0
Reply gof5 (21) 3/28/2012 8:00:39 AM

On Wed, 28 Mar 2012 03:22:28 -0400, Barry Margolin
<barmar@alum.mit.edu> wrote:

>In article <4f72253a$0$15142$bbae4d71@news.suddenlink.net>,
> "Bill Cunningham" <nospam@nspam.invalid> wrote:
>
>>     What would be the easiest way to start learning *nix IPC and networkg? 
>> Pipes, message qeues, or perhaps unix packets or anything else?
>> 
>> Bill
>
>The books "Unix Network Programming" by W. Richard Stevens.  They're 
>over a dozen years old, so some things may be a little out of date, but 
>they're probably still one of the best overviews.  We lost a great 
>author when he died.

+1
-- 
(\__/)  M.
(='.'=) If a man stands in a forest and no woman is around
(")_(") is he still wrong?

0
Reply i1658 (113) 3/28/2012 8:28:44 AM

Barry Margolin wrote:

> The books "Unix Network Programming" by W. Richard Stevens.  They're
> over a dozen years old, so some things may be a little out of date,
> but they're probably still one of the best overviews.  We lost a great
> author when he died.

    We lost a great one when dmr died too. Just to throw that out.

B


0
Reply nospam116 (1187) 3/29/2012 12:37:00 AM

On Wed, 28 Mar 2012 03:22:28 -0400
Barry Margolin <barmar@alum.mit.edu> wrote:
>In article <4f72253a$0$15142$bbae4d71@news.suddenlink.net>,
> "Bill Cunningham" <nospam@nspam.invalid> wrote:
>
>>     What would be the easiest way to start learning *nix IPC and networkg? 
>> Pipes, message qeues, or perhaps unix packets or anything else?
>> 
>> Bill
>
>The books "Unix Network Programming" by W. Richard Stevens.  They're 
>over a dozen years old, so some things may be a little out of date, but 
>they're probably still one of the best overviews.  We lost a great 
>author when he died.

But unlike Windows the core unix networking API hardly changes so almost 
everything in those books still apply. The only thing they're probably
missing is SCTP (which flopped so who cares) and an overview of HTTP.

B2003

0
Reply boltar20032 (164) 3/29/2012 9:40:46 AM

On Tue, 27 Mar 2012 17:31:14 -0400
Lew Pitcher <lpitcher@teksavvy.com> wrote:

[...]
> I'd suggest
>   "Unix Network Programming Volume 1 (Networking API's: Sockets and
> XTI)" by W. Richard Stevens
>   (Prentice-Hall Publising, ISBN 0-13-490012-X)
> and
>   "Unix Network Programming Volume 2 (Interprocess Communications)"
>   by W. Richard Stevens
>   (Prentice-Hall Publising, ISBN 0-13-081081-9)
> 
> They both include clear descriptions and explanations of a wide
> variety of Unix communications choices, and provide source code
> examples in C.

The Stevens' books are great resources, but are out of date; ok

Good book is "The linux programming interface"
http://man7.org/tlpi/
0
Reply luka (3) 3/29/2012 4:20:44 PM

On Thu, 29 Mar 2012 18:20:44 +0200
luka <luka@autistici.org> wrote:
>On Tue, 27 Mar 2012 17:31:14 -0400
>Lew Pitcher <lpitcher@teksavvy.com> wrote:
>
>[...]
>> I'd suggest
>>   "Unix Network Programming Volume 1 (Networking API's: Sockets and
>> XTI)" by W. Richard Stevens
>>   (Prentice-Hall Publising, ISBN 0-13-490012-X)
>> and
>>   "Unix Network Programming Volume 2 (Interprocess Communications)"
>>   by W. Richard Stevens
>>   (Prentice-Hall Publising, ISBN 0-13-081081-9)
>> 
>> They both include clear descriptions and explanations of a wide
>> variety of Unix communications choices, and provide source code
>> examples in C.
>
>The Stevens' books are great resources, but are out of date; ok

Not for core network programming they're not. Unless you're suggesting
for example that the socket/bind/listen/select/accept sequence has changed?
If you want to do standard unix network programming in C then the Stevens
books are perfectly adequate.

B2003

0
Reply boltar20032 (164) 3/30/2012 8:47:40 AM

boltar2003@boltar.world wrote:

> On Thu, 29 Mar 2012 18:20:44 +0200
> luka <luka@autistici.org> wrote:
>>
>>The Stevens' books are great resources, but are out of date; ok
>
> Not for core network programming they're not. Unless you're suggesting
> for example that the socket/bind/listen/select/accept sequence has changed?
> If you want to do standard unix network programming in C then the Stevens
> books are perfectly adequate.

There is a third edition of Volume 1 that has been brought up to
date (by Bill Fenner and Andy Rudoff).  See http://www.unpbook.com/

A pertinent quote from that web page:

    "Sockets have been around, more or less in their current form,
    since the 1980s, and it is a tribute to their initial design that
    they have continued to be the network API of choice. Therefore, it
    may come as a surprise to learn that quite a bit has changed since
    the second edition of this book was published in 1998. The changes
    we've made to the text are summarized as follows: "

-- 
Geoff Clare <netnews@gclare.org.uk>

0
Reply geoff31 (368) 4/2/2012 12:47:43 PM

On Mon, 2 Apr 2012 13:47:43 +0100
Geoff Clare <geoff@clare.See-My-Signature.invalid> wrote:
>boltar2003@boltar.world wrote:
>
>> On Thu, 29 Mar 2012 18:20:44 +0200
>> luka <luka@autistici.org> wrote:
>>>
>>>The Stevens' books are great resources, but are out of date; ok
>>
>> Not for core network programming they're not. Unless you're suggesting
>> for example that the socket/bind/listen/select/accept sequence has changed?
>> If you want to do standard unix network programming in C then the Stevens
>> books are perfectly adequate.
>
>There is a third edition of Volume 1 that has been brought up to
>date (by Bill Fenner and Andy Rudoff).  See http://www.unpbook.com/
>
>A pertinent quote from that web page:
>
>    "Sockets have been around, more or less in their current form,
>    since the 1980s, and it is a tribute to their initial design that
>    they have continued to be the network API of choice. Therefore, it
>    may come as a surprise to learn that quite a bit has changed since
>    the second edition of this book was published in 1998. The changes
>    we've made to the text are summarized as follows: "

None of the changes they mention apart from IP6 have anything to do with using
the core sockets interface to write standard TCP/UDP clients or servers.

B2003


0
Reply boltar20032 (164) 4/2/2012 1:35:23 PM

In article <jlc9ur$d5k$1@speranza.aioe.org>, boltar2003@boltar.world 
wrote:

> On Mon, 2 Apr 2012 13:47:43 +0100
> Geoff Clare <geoff@clare.See-My-Signature.invalid> wrote:
> >boltar2003@boltar.world wrote:
> >
> >> On Thu, 29 Mar 2012 18:20:44 +0200
> >> luka <luka@autistici.org> wrote:
> >>>
> >>>The Stevens' books are great resources, but are out of date; ok
> >>
> >> Not for core network programming they're not. Unless you're suggesting
> >> for example that the socket/bind/listen/select/accept sequence has changed?
> >> If you want to do standard unix network programming in C then the Stevens
> >> books are perfectly adequate.
> >
> >There is a third edition of Volume 1 that has been brought up to
> >date (by Bill Fenner and Andy Rudoff).  See http://www.unpbook.com/
> >
> >A pertinent quote from that web page:
> >
> >    "Sockets have been around, more or less in their current form,
> >    since the 1980s, and it is a tribute to their initial design that
> >    they have continued to be the network API of choice. Therefore, it
> >    may come as a surprise to learn that quite a bit has changed since
> >    the second edition of this book was published in 1998. The changes
> >    we've made to the text are summarized as follows: "
> 
> None of the changes they mention apart from IP6 have anything to do with using
> the core sockets interface to write standard TCP/UDP clients or servers.

To be fair, the change "The descriptions of functions and the examples 
have all been updated to reflect the most recent POSIX specification" is 
pretty vague, and could encompass quite a bit.  But I suspect that the 
changes are relatively minor, mostly just clarifications.

-- 
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
0
Reply barmar (5664) 4/2/2012 6:53:32 PM

Barry Margolin wrote:

> In article <jlc9ur$d5k$1@speranza.aioe.org>, boltar2003@boltar.world 
> wrote:
>
>> On Mon, 2 Apr 2012 13:47:43 +0100
>> Geoff Clare <geoff@clare.See-My-Signature.invalid> wrote:
>> >boltar2003@boltar.world wrote:
>> >
>> >> On Thu, 29 Mar 2012 18:20:44 +0200
>> >> luka <luka@autistici.org> wrote:
>> >>>
>> >>>The Stevens' books are great resources, but are out of date; ok
>> >>
>> >> Not for core network programming they're not. Unless you're suggesting
>> >> for example that the socket/bind/listen/select/accept sequence has changed?
>> >> If you want to do standard unix network programming in C then the Stevens
>> >> books are perfectly adequate.
>> >
>> >There is a third edition of Volume 1 that has been brought up to
>> >date (by Bill Fenner and Andy Rudoff).  See http://www.unpbook.com/
>> >
>> >A pertinent quote from that web page:
>> >
>> >    "Sockets have been around, more or less in their current form,
>> >    since the 1980s, and it is a tribute to their initial design that
>> >    they have continued to be the network API of choice. Therefore, it
>> >    may come as a surprise to learn that quite a bit has changed since
>> >    the second edition of this book was published in 1998. The changes
>> >    we've made to the text are summarized as follows: "
>> 
>> None of the changes they mention apart from IP6 have anything to do with using
>> the core sockets interface to write standard TCP/UDP clients or servers.
>
> To be fair, the change "The descriptions of functions and the examples 
> have all been updated to reflect the most recent POSIX specification" is 
> pretty vague, and could encompass quite a bit.  But I suspect that the 
> changes are relatively minor, mostly just clarifications.

One possibility that springs to mind is the introduction of socklen_t,
which happened around the time the second edition was published, so
might not have made it in (and thus be new in the third edition).
Did the second edition say the last argument to accept() has type
pointer to socklen_t?

-- 
Geoff Clare <netnews@gclare.org.uk>

0
Reply geoff31 (368) 4/4/2012 12:24:30 PM

12 Replies
96 Views

(page loaded in 0.208 seconds)


Reply: