Re: sockaddr_in() timeout or asynchone call ?
- From: Asterbing <no@xxxxxxxxxx>
- Date: Mon, 27 Mar 2006 11:36:08 +0200
In article <x7wtegepdh.fsf@xxxxxxxxxxxxxxxx>, uri@xxxxxxxxxxxxxxx
says...
don't use most perl code you find on the net. too much of it sucks and
is for kiddies.
OK, daddy ;)
LWP (the perl web client modules) is now in the core distribution. but
that still means making sure your servers have a recent perl. if you
can't load modules (which you can as a normal user so that is not a
valid excuse) then how would you load a recent perl?
I will have to install the script on several servers, we the less upt to
date being with Perl 5.00503 under FreeBSD
>> my $sock = IO::Socket::INET->new( "$host:$port" ) ;
A> Is that the only line to change in the sub ?
no. it replaces all the crappy socket code you copied. another point is
Understood
A> print hpSOCK "GET $path HTTP/1.1\015\012";
A> print hpSOCK "Host: $host\015\012\015\012";
all that code is handled by LWP so use it instead of the crap you
copied.
Yes, but I don't want to consider the GET return (neither header nor
server response content). My subject is just to push url parameters
toward the remote cgi !
Well, someone in fr.comp.lang.perl suggest me to go through fork like
this for the purpose to do thing be no-blocking for the rest of the
script (as I wish) :
my $child = fork;
die "fork: $!\n" unless defined $child;
return if $child;
What do you mean about this way ? It's a little bit obscur for me and
don't really see how to embed a call to my sub this way...
.
- References:
- sockaddr_in() timeout or asynchone call ?
- From: Asterbing
- Re: sockaddr_in() timeout or asynchone call ?
- From: Jim Gibson
- Re: sockaddr_in() timeout or asynchone call ?
- From: Uri Guttman
- Re: sockaddr_in() timeout or asynchone call ?
- From: Asterbing
- Re: sockaddr_in() timeout or asynchone call ?
- From: Uri Guttman
- Re: sockaddr_in() timeout or asynchone call ?
- From: Asterbing
- Re: sockaddr_in() timeout or asynchone call ?
- From: Uri Guttman
- sockaddr_in() timeout or asynchone call ?
- Prev by Date: Re: short form for (defined $x and defined $y and ... )?
- Next by Date: Mail::SendEasy defaulting to localhost?
- Previous by thread: Re: sockaddr_in() timeout or asynchone call ?
- Next by thread: Re: sockaddr_in() timeout or asynchone call ?
- Index(es):
Relevant Pages
|