configurable tiemouts

This commit is contained in:
sparc 2005-07-16 14:24:10 +00:00
parent b880f40d67
commit 3fad32287f
2 changed files with 8 additions and 1 deletions

View file

@ -6,7 +6,8 @@
- improvements to genric whois handling
- improvments & fixes to esnic, denic and brnic
handlers
- added configurable timeout for sockec communications
2005/04/28 David Saez <david@ols.es>
- Fixed .fm handling
- normalized expired/created/chaged dates

View file

@ -93,6 +93,9 @@ class Whois {
// List of servers and handlers (loaded from servers.whois)
var $DATA = array();
// Communications timeout
var $timeout = 10;
/*
* Constructor function
*/
@ -463,12 +466,15 @@ class Whois {
// Connect to whois server, or return if failed
$ptr = $this->Connect();
if($ptr < 0) {
$this->Query["status"] = -1;
$this->Query["errstr"][] = "Connect failed to: ".$this->Query["server"];
return(array());
}
stream_set_timeout($ptr,$this->timeout);
if (isset($this->WHOIS_PARAM[$this->Query["tld"]]))
fputs($ptr, $this->WHOIS_PARAM[$this->Query["tld"]].trim($string)."\r\n");
else