diff --git a/src/Ratchet/WebSocket/Version/Hixie76/Connection.php b/src/Ratchet/WebSocket/Version/Hixie76/Connection.php index 2011ac1..bb6dcaa 100644 --- a/src/Ratchet/WebSocket/Version/Hixie76/Connection.php +++ b/src/Ratchet/WebSocket/Version/Hixie76/Connection.php @@ -7,10 +7,12 @@ use Ratchet\AbstractConnectionDecorator; */ class Connection extends AbstractConnectionDecorator { public function send($msg) { - return $this->getConnection()->send(chr(0) . $msg . chr(255)); + $this->getConnection()->send(chr(0) . $msg . chr(255)); + + return $this; } public function close() { - return $this->getConnection()->close(); + $this->getConnection()->close(); } } \ No newline at end of file diff --git a/src/Ratchet/WebSocket/Version/RFC6455/Connection.php b/src/Ratchet/WebSocket/Version/RFC6455/Connection.php index acd5bb6..c05d643 100644 --- a/src/Ratchet/WebSocket/Version/RFC6455/Connection.php +++ b/src/Ratchet/WebSocket/Version/RFC6455/Connection.php @@ -14,6 +14,8 @@ class Connection extends AbstractConnectionDecorator { } $this->getConnection()->send($msg->getContents()); + + return $this; } /**