Re: socket connect and response time

From: Date: Fri, 19 Sep 2003 15:14:54 +0000
Subject: Re: socket connect and response time
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-163158@lists.php.net to get a copy of this message
Simon Wistow <simon@thegestalt.org> writes:
Is there an easy way to get the time taken to connect and the time taken to respond to an HTTP request or am I going to have to go in and hack around?
Be careful, there are problems with timeouts, which dont work natively (you can get 20sec timeout or more when requesting 3sec) LWP::UserAgent uses IO::Socket::INET and 1. with LWP 5.69, Perl 5.8.0, Linux 2.4.18 the timeout handling code is put in comment you can define your own signal handling around the calls to LWP (sigaction prefered) 2. with LWP 5.43, Perl 5.005_03, Linux 2.2.16 the timeout handling code is not in comment but doesnt work for me (block in dns lookup, SIGINT I think) But with Verisign rerouting all inexistant .com/.net domains, the timeout will dramatically decrease for these :-( Christophe

« previous php.general (#163158) next »