protected function sendToClient($connectionId, $data, $type = 'text') { if (!isset($this->_handshakes[$connectionId])) { $this->_write($connectionId, $this->_encode($data, $type)); } }