public function upload($ftkey, $seek, $data)
  {
    $this->init($ftkey);

    $size = strlen($data);
    $seek = intval($seek);
    $pack = 4096;

    TeamSpeak3_Helper_Signal::getInstance()->emit("filetransferUploadStarted", $ftkey, $seek, $size);

    for(;$seek < $size;)
    {
      $rest = $size-$seek;
      $pack = $rest < $pack ? $rest : $pack;
      $buff = substr($data, $seek, $pack);
      $seek = $seek+$pack;

      $this->getTransport()->send($buff);

      TeamSpeak3_Helper_Signal::getInstance()->emit("filetransferUploadProgress", $ftkey, $seek, $size);
    }

    $this->getProfiler()->stop();

    TeamSpeak3_Helper_Signal::getInstance()->emit("filetransferUploadFinished", $ftkey, $seek, $size);

    if($seek < $size)
    {
      throw new TeamSpeak3_Adapter_FileTransfer_Exception("incomplete file upload (" . $seek . " of " . $size . " bytes)");
    }
  }
public function upload($ftkey, $seek, $data)
  {
    $this->init($ftkey);

    $size = strlen($data);
    $seek = intval($seek);
    $pack = 4096;

    TeamSpeak3_Helper_Signal::getInstance()->emit("filetransferUploadStarted", $ftkey, $seek, $size);

    for(;$seek < $size;)
    {
      $rest = $size-$seek;
      $pack = $rest < $pack ? $rest : $pack;
      $buff = substr($data, $seek, $pack);
      $seek = $seek+$pack;

      $this->getTransport()->send($buff);

      TeamSpeak3_Helper_Signal::getInstance()->emit("filetransferUploadProgress", $ftkey, $seek, $size);
    }

    $this->getProfiler()->stop();

    TeamSpeak3_Helper_Signal::getInstance()->emit("filetransferUploadFinished", $ftkey, $seek, $size);

    if($seek < $size)
    {
      throw new TeamSpeak3_Adapter_FileTransfer_Exception("incomplete file upload (" . $seek . " of " . $size . " bytes)");
    }
  }
public function upload ( $ ftkey , $ seek , $ data ) { $ this -> init ( $ ftkey ) ; $ size = strlen ( $ data ) ; $ seek = intval ( $ seek ) ; $ pack = 4096 ; TeamSpeak3_Helper_Signal :: getInstance ( ) -> emit ( "filetransferUploadStarted" , $ ftkey , $ seek , $ size ) ; for ( ; $ seek < $ size ; ) { $ rest = $ size - $ seek ; $ pack = $ rest < $ pack ? $ rest : $ pack ; $ buff = substr ( $ data , $ seek , $ pack ) ; $ seek = $ seek + $ pack ; $ this -> getTransport ( ) -> send ( $ buff ) ; TeamSpeak3_Helper_Signal :: getInstance ( ) -> emit ( "filetransferUploadProgress" , $ ftkey , $ seek , $ size ) ; } $ this -> getProfiler ( ) -> stop ( ) ; TeamSpeak3_Helper_Signal :: getInstance ( ) -> emit ( "filetransferUploadFinished" , $ ftkey , $ seek , $ size ) ; if ( $ seek < $ size ) { throw new TeamSpeak3_Adapter_FileTransfer_Exception ( "incomplete file upload (" . $ seek . " of " . $ size . " bytes)" ) ; } }
Sends the content of a file to the server.

@param  string  $ftkey
@param  integer $seek
@param  string  $data
@throws TeamSpeak3_Adapter_FileTransfer_Exception
@return void
Sends the content of a file to the server .