public function sendBuffer($data)
    {
        if (! $this->ready) {
            return;
        }

        $packet = new VoicePacket($data, $this->ssrc, $this->seq, $this->timestamp, true, $this->secret_key);
        $this->client->send((string) $packet);

        $this->streamTime = microtime(true);

        $this->emit('packet-sent', [$packet]);
    }
public function sendBuffer($data)
    {
        if (! $this->ready) {
            return;
        }

        $packet = new VoicePacket($data, $this->ssrc, $this->seq, $this->timestamp, true, $this->secret_key);
        $this->client->send((string) $packet);

        $this->streamTime = microtime(true);

        $this->emit('packet-sent', [$packet]);
    }
public function sendBuffer ( $ data ) { if ( ! $ this -> ready ) { return ; } $ packet = new VoicePacket ( $ data , $ this -> ssrc , $ this -> seq , $ this -> timestamp , true , $ this -> secret_key ) ; $ this -> client -> send ( ( string ) $ packet ) ; $ this -> streamTime = microtime ( true ) ; $ this -> emit ( 'packet-sent' , [ $ packet ] ) ; }
Sends a buffer to the UDP socket.

@param string $data The data to send to the UDP server.

@return void
Sends a buffer to the UDP socket .