src/Guzzle/Plugin/Async/AsyncPlugin.php
public function onCurlProgress(Event $event)
    {
        if ($event['handle'] &&
            ($event['downloaded'] || (isset($event['uploaded']) && $event['upload_size'] === $event['uploaded']))
        ) {
            // Timeout after 1ms
            curl_setopt($event['handle'], CURLOPT_TIMEOUT_MS, 1);
            // Even if the response is quick, tell curl not to download the body.
            // - Note that we can only perform this shortcut if the request transmitted a body so as to ensure that the
            //   request method is not converted to a HEAD request before the request was sent via curl.
            if ($event['uploaded']) {
                curl_setopt($event['handle'], CURLOPT_NOBODY, true);
            }
        }
    }
public function onCurlProgress(Event $event)
    {
        if ($event['handle'] &&
            ($event['downloaded'] || (isset($event['uploaded']) && $event['upload_size'] === $event['uploaded']))
        ) {
            // Timeout after 1ms
            curl_setopt($event['handle'], CURLOPT_TIMEOUT_MS, 1);
            // Even if the response is quick, tell curl not to download the body.
            // - Note that we can only perform this shortcut if the request transmitted a body so as to ensure that the
            //   request method is not converted to a HEAD request before the request was sent via curl.
            if ($event['uploaded']) {
                curl_setopt($event['handle'], CURLOPT_NOBODY, true);
            }
        }
    }
public function onCurlProgress ( Event $ event ) { if ( $ event [ 'handle' ] && ( $ event [ 'downloaded' ] || ( isset ( $ event [ 'uploaded' ] ) && $ event [ 'upload_size' ] === $ event [ 'uploaded' ] ) ) ) { // Timeout after 1ms curl_setopt ( $ event [ 'handle' ] , CURLOPT_TIMEOUT_MS , 1 ) ; // Even if the response is quick, tell curl not to download the body. // - Note that we can only perform this shortcut if the request transmitted a body so as to ensure that the //   request method is not converted to a HEAD request before the request was sent via curl. if ( $ event [ 'uploaded' ] ) { curl_setopt ( $ event [ 'handle' ] , CURLOPT_NOBODY , true ) ; } } }
Event emitted when a curl progress function is called. When the amount of data uploaded == the amount of data to
upload OR any bytes have been downloaded, then time the request out after 1ms because we're done with
transmitting the request, and tell curl not download a body.

@param Event $event
Event emitted when a curl progress function is called . When the amount of data uploaded == the amount of data to upload OR any bytes have been downloaded then time the request out after 1ms because we re done with transmitting the request and tell curl not download a body .