IO::Socket autoflush by default, assume tcp and PeerAddr
authorGisle Aas <aas@bergen.sn.no>
Thu, 28 Aug 1997 02:36:50 +0000 (14:36 +1200)
committerTim Bunce <Tim.Bunce@ig.co.uk>
Fri, 5 Sep 1997 00:00:00 +0000 (00:00 +0000)
commitd103aadb464fdc9458aeaedf1165336dcbe99ff0
tree4635c1707063f627113917a012e27f6bd529401b
parent82032852497e499c142286b6bed77c4d03454c0a
IO::Socket autoflush by default, assume tcp and PeerAddr

Subject: IO::Socket suggestion

The following patch to IO::Socket have this effect:

   - put IO::Socket objects in autoflush mode initially
   - assume Proto => "tcp" if no Proto is given (IO::Socket::INET)
   - a single argument to IO::Socket::INET->new is assumed to be
     a PeerAddr specification.

Comments?

It allows the following (rather long) one-liner to work:

 $ perl -I. -MIO::Socket -e '$s=IO::Socket::INET->new("www.perl.com:80");$s->print("HEAD / HTTP/1.0\n\n"); print<$s>'

Credited: Andy Dougherty <doughera@newton.phys.lafayette.edu>
Credited: M.J.T. Guy <mjtg@cus.cam.ac.uk>

p5p-msgid: hvi07zvo9.fsf@bergen.sn.no
ext/IO/lib/IO/Socket.pm