Standard/TeamSpeak/TeamSpeak3/Transport/UDP.php
public function read($length = 4096)
  {
    $this->connect();
    $this->waitForReadyRead();

    $data = @fread($this->stream, $length);

    \ManiaLivePlugins\Standard\TeamSpeak\TeamSpeak3\Helper\Signal::getInstance()->emit(strtolower($this->getAdapterType()) . "DataRead", $data);

    if($data === FALSE)
    {
      throw new Exception("connection to server '" . $this->config["host"] . ":" . $this->config["port"] . "' lost");
    }

    return new \ManiaLivePlugins\Standard\TeamSpeak\TeamSpeak3\Helper\String($data);
  }
public function read($length = 4096)
  {
    $this->connect();
    $this->waitForReadyRead();

    $data = @fread($this->stream, $length);

    \ManiaLivePlugins\Standard\TeamSpeak\TeamSpeak3\Helper\Signal::getInstance()->emit(strtolower($this->getAdapterType()) . "DataRead", $data);

    if($data === FALSE)
    {
      throw new Exception("connection to server '" . $this->config["host"] . ":" . $this->config["port"] . "' lost");
    }

    return new \ManiaLivePlugins\Standard\TeamSpeak\TeamSpeak3\Helper\String($data);
  }
Reads data from the stream.

@param  integer $length
@throws Exception
@return \ManiaLivePlugins\Standard\TeamSpeak\TeamSpeak3\Helper\String