Click here to get back home

IO::Socket->socketpair()

 HomeNewsGroups | Search | About
 comp.lang.perl.modules    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
IO::Socket->socketpair() xhoster 05-21-2007
Posted by xhoster on May 21, 2007, 3:25 pm
Please log in for more thread options


In the spirit of DWIM, shouldn't IO::Select->socketpair()
provide reasonable defaults for DOMAIN, TYPE, and PROTOCOL if it is
called with no arguments?

It seems like the vast majority of the time I see socketpair used,
it is with (AF_UNIX, SOCK_STREAM, PF_UNSPEC). Indeed, until recently I
didn't even know what they meant, it was just copy and paste by rote--which
I think makes them excellent candidates for being DWIMed away.

Thanks for any thoughts,

Xho

--
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service $9.95/Month 30GB

Posted by Uri Guttman on May 21, 2007, 4:13 pm
Please log in for more thread options



x> In the spirit of DWIM, shouldn't IO::Select->socketpair()
x> provide reasonable defaults for DOMAIN, TYPE, and PROTOCOL if it is
x> called with no arguments?

x> It seems like the vast majority of the time I see socketpair used,
x> it is with (AF_UNIX, SOCK_STREAM, PF_UNSPEC). Indeed, until recently I
x> didn't even know what they meant, it was just copy and paste by rote--which
x> I think makes them excellent candidates for being DWIMed away.

use pipe() instead as they are the same thing underneath these days in
at least unix flavors. $DEITY know what redmond does there.

uri

--
Uri Guttman ------ uri@stemsystems.com -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs ---------------------------- http://jobs.perl.org


Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap