[WebSocket] Connection API
All implementations of ConnectionInterface return themselves
This commit is contained in:
parent
491d0c779c
commit
6b32996b8e
@ -7,10 +7,12 @@ use Ratchet\AbstractConnectionDecorator;
|
|||||||
*/
|
*/
|
||||||
class Connection extends AbstractConnectionDecorator {
|
class Connection extends AbstractConnectionDecorator {
|
||||||
public function send($msg) {
|
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() {
|
public function close() {
|
||||||
return $this->getConnection()->close();
|
$this->getConnection()->close();
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -14,6 +14,8 @@ class Connection extends AbstractConnectionDecorator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$this->getConnection()->send($msg->getContents());
|
$this->getConnection()->send($msg->getContents());
|
||||||
|
|
||||||
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user