public function createConnection(HostConfiguration $configuration)
    {
        if ($this->cache->offsetExists($configuration)) {
            return $this->cache->offsetGet($configuration);
        }
        $connection = new SocketConnection();
        $connection->setConfiguration($configuration);
        $connection->open();
        $this->cache->attach($configuration, $connection);
        return $connection;
    }