Make WordPress Core

Changeset 1673


Ignore:
Timestamp:
09/16/2004 05:07:59 PM (21 years ago)
Author:
michelvaldrighi
Message:

added timeout and vendor parameters to IXR_Client, could be very useful for weblog_pings

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/class-IXR.php

    r1564 r1673  
    465465    var $useragent;
    466466    var $response;
     467    var $timeout;
     468    var $vendor = '';
    467469    var $message = false;
    468470    var $debug = false;
    469471    // Storage place for an error message
    470472    var $error = false;
    471     function IXR_Client($server, $path = false, $port = 80) {
     473    function IXR_Client($server, $path = false, $port = 80, $timeout = 30, $vendor = '') {
    472474        if (!$path) {
    473475            // Assume we have been given a URL instead
     
    484486            $this->path = $path;
    485487            $this->port = $port;
     488            $this->timeout = $timeout;
    486489        }
    487490        $this->useragent = 'The Incutio XML-RPC PHP Library';
     
    504507            echo '<pre>'.htmlspecialchars($request)."\n</pre>\n\n";
    505508        }
    506         $fp = @fsockopen($this->server, $this->port);
     509        $fp = @fsockopen($this->server, $this->port, $errno, $errstr, $this->timeout);
    507510        if (!$fp) {
    508511            $this->error = new IXR_Error(-32300, 'transport error - could not open socket');
Note: See TracChangeset for help on using the changeset viewer.