public function attachWss($wss) { if ($this->wss->contains($wss)) { return false; } $this->wss->attach($wss); $wss->bind('customTransport', [$this, 'wsHandler']); return true; }