public function clear($resource) { $socketId = (int) $resource; if (isset($this->socketIdUriMap[$socketId])) { $uri = $this->socketIdUriMap[$socketId]; $this->unloadSocket($uri, $socketId); } return $this; }