code: protected Socket createSocketFromFactory(SocketFactory factory, String host, int port) throws IOException
  	{
         	if (logger.isDebugEnabled()) {
      		logger.debug("Connecting to " + host +" on port " + port + 
      				" (timeout: " + CONTEXT.getConfig().getConnectTimeout() + " ms) using factory "+ factory.getClass().getName());
      	}
      	SocketAddress address = new InetSocketAddress(host,port);
          Socket socket = factory.createSocket();
      	socket.connect(address, CONTEXT.getConfig().getConnectTimeout());
          // Set amount of time to wait on socket read before timing out
          socket.setSoTimeout(CONTEXT.getConfig().getSocketTimeout());
          socket.setKeepAlive(true);
          
          return socket;
  	}
docs: Creates a new connected socket to a given host and port from a provided Socket Factory.
  @param factory Java Socket Factory to use in the connection
  @param host Hostname to connect to
  @param port Port to connect to
  @return Connected socket instance from the given factory
  @throws IOException