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