コード例 #1
0
 public function onClose(WebSocketConnection $connection)
 {
     if ($this->isSubscribed($connection)) {
         $this->unsubscribe($connection);
     }
     $this->connections = $this->connections->filter(function ($c) use($connection) {
         return $c !== $connection;
     });
 }
コード例 #2
0
 public function removeConnection(WebSocketConnection $connection)
 {
     $this->connections = $this->connections->filter(function ($c) use($connection) {
         return $c !== $connection;
     });
 }