[WebSocket] Connection API

All implementations of ConnectionInterface return themselves
This commit is contained in:
Chris Boden 2012-07-22 20:05:04 -04:00
parent faa4083b81
commit 491919f7dc
2 changed files with 6 additions and 2 deletions

View File

@ -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();
}
}

View File

@ -14,6 +14,8 @@ class Connection extends AbstractConnectionDecorator {
}
$this->getConnection()->send($msg->getContents());
return $this;
}
/**