data; } else { $frame = new Frame($msg); $data = $frame->data; } $this->getConnection()->send($data); } /** * {@inheritdoc} */ public function close($code = 1000) { $frame = new Frame($code, true, Frame::OP_CLOSE); $this->send($frame->data); $this->getConnection()->close(); } }