public function sendPartial($event)
    {
        $range = $event->sender->getAttribute('accept-range');        
        $readSize = $this->read_buffer;
        $pos = ftell($event->sender->getFileHandler($this->fileKey));
        
        if($range){
            $readSize = min($range[1]-$pos+1, $readSize);
        }
        
        if($readSize <=0){
            return $this->sendPartialFinish($event);
        }
        
        $c = fread($event->sender->getFileHandler($this->fileKey), $readSize);
        
        if($range && $pos >= $range[1]) {
            return $this->sendPartialFinish($event);
        }
        
        if($c === false){
            \Yii::error("error while sending file ".$event->data['path'], 'beyod\http');
            return $event->sender->close();
        }
        
        if(feof($event->sender->getFileHandler($this->fileKey))){
            $this->sendPartialFinish($event);
        }
        
        $event->sender->send($c, true);
        
        //fflush($event->sender->getSocket());
    }