includes/http.php
changeset 1034 15fa1b4e730a
parent 952 d52dfa1f08da
child 1081 745200a9cc2a
equal deleted inserted replaced
1033:99bff0df45fa 1034:15fa1b4e730a
   324    */
   324    */
   325   
   325   
   326   function _sock_open(&$connection)
   326   function _sock_open(&$connection)
   327   {
   327   {
   328     // Open connection
   328     // Open connection
   329     $connection = @fsockopen($this->host, $this->port);
   329     $connection = fsockopen($this->host, $this->port, $errno, $errstr);
   330     if ( !$connection )
   330     if ( !$connection )
   331       throw new Exception(__METHOD__ . ': Could not make connection');
   331       throw new Exception(__METHOD__ . ": Could not make connection"); // to {$this->host}:{$this->port}: error $errno: $errstr");
   332     
   332     
   333     // 1 = socket open
   333     // 1 = socket open
   334     $this->state = 1;
   334     $this->state = 1;
   335   }
   335   }
   336   
   336