WebSocket = new \StdClass; } public function send($data) { if ($this->hasVersion()) { // need frame caching $data = $this->WebSocket->version->frame($data, false); } $this->getConnection()->send($data); } public function close() { // send close frame with code 1000 // ??? // profit $this->getConnection()->close(); // temporary } /** * @return boolean * @internal */ public function hasVersion() { return (null === $this->version); } /** * Set the WebSocket protocol version to communicate with * @param Ratchet\WebSocket\Version\VersionInterface * @internal */ public function setVersion(VersionInterface $version) { $this->WebSocket->version = $version; return $this; } }