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

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

        Signal::getInstance()->emit(strtolower($this->getAdapterType()) . "DataRead", $data);

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

        return new StringHelper($data);
    }
public function read($length = 4096)
    {
        $this->connect();
        $this->waitForReadyRead();

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

        Signal::getInstance()->emit(strtolower($this->getAdapterType()) . "DataRead", $data);

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

        return new StringHelper($data);
    }
public function read ( $ length = 4096 ) { $ this -> connect ( ) ; $ this -> waitForReadyRead ( ) ; $ data = @ stream_get_contents ( $ this -> stream , $ length ) ; Signal :: getInstance ( ) -> emit ( strtolower ( $ this -> getAdapterType ( ) ) . "DataRead" , $ data ) ; if ( $ data === false ) { throw new Ts3Exception ( "connection to server '" . $ this -> config [ "host" ] . ":" . $ this -> config [ "port" ] . "' lost" ) ; } return new StringHelper ( $ data ) ; }
Reads data from the stream.

@param  integer $length
@throws Ts3Exception
@return StringHelper
Reads data from the stream .