Amp\Artax\SocketPool::clear PHP Method

clear() public method

Remove the specified socket from the pool
public clear ( resource $resource ) : self
$resource resource
return self
    public function clear($resource)
    {
        $socketId = (int) $resource;
        if (isset($this->socketIdUriMap[$socketId])) {
            $uri = $this->socketIdUriMap[$socketId];
            $this->unloadSocket($uri, $socketId);
        }
        return $this;
    }