[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[no subject]



I know I can use LWP but I'm first during straight I/O.  This is to see
if my select() idea is plausible when creating my proxy.

#!/usr/bin/perl
#
#

use IO::Socket::INET;
use IO::Handle;
use strict;


my $string = "GET / HTTP/1.1\r\n\r\n";

my $s = IO::Socket::INET->new(PeerAddr => 'www.google.com',
  PeerPort => 80, Proto => 'tcp') or die "$!\n";


print $s $string;
$s->flush();
while(<$s>) {
  print $_;
  STDOUT->flush();



</pre>
<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<hr>
<ul><li><strong>Follow-Ups</strong>:
<ul>
<li><strong><a name="00627" href="msg00627.html">[ale] Re: IO to a web site.</a></strong>
<ul><li><em>From:</em> eric at afaik.us (Eric Anderson)</li></ul></li>
<li><strong><a name="00650" href="msg00650.html">[ale] IO to a web site.</a></strong>
<ul><li><em>From:</em> jasonday at worldnet.att.net (Jason Day)</li></ul></li>
</ul></li></ul>
<!--X-Follow-Ups-End-->
<!--X-References-->
<!--X-References-End-->
<!--X-BotPNI-->
<ul>
<li>Prev by Date:
<strong><a href="msg00588.html">[ale] ALE booth at LISA</a></strong>
</li>
<li>Next by Date:
<strong><a href="msg00590.html">[ale] How to debug make errors</a></strong>
</li>
<li>Previous by thread:
<strong><a href="msg00647.html">[ale] usbdevfs confusion</a></strong>
</li>
<li>Next by thread:
<strong><a href="msg00627.html">[ale] Re: IO to a web site.</a></strong>
</li>
<li>Index(es):
<ul>
<li><a href="maillist.html#00589"><strong>Date</strong></a></li>
<li><a href="threads.html#00589"><strong>Thread</strong></a></li>
</ul>
</li>
</ul>

<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
</body>
</html>