public function client($alias)
    {
        if (is_int($alias) && isset($this->clients[$alias])) {
            return $this->clients[$alias];
        } elseif (isset($this->aliases[$alias])) {
            return $this->aliases[$alias];
        }
        throw new Exception("Client $alias does not exist.");
    }