code: func (p *ConnPool) DialTimeout(dc string, addr net.Addr, timeout time.Duration, useTLS bool) (net.Conn, HalfCloser, error) {
  	p.once.Do(p.init)
  
  	// Try to dial the conn
  	d := &net.Dialer{LocalAddr: p.SrcAddr, Timeout: timeout}
  	conn, err := d.Dial("tcp", addr.String())
  	if err != nil {
  		return nil, nil, err
  	}
  
  	// Cast to TCPConn
  	var hc HalfCloser
  	if tcp, ok := conn.(*net.TCPConn); ok {
  		tcp.SetKeepAlive(true)
  		tcp.SetNoDelay(true)
  		hc = tcp
  	}
  
  	// Check if TLS is enabled
  	if (useTLS || p.ForceTLS) && p.TLSWrapper != nil {
  		// Switch the connection into TLS mode
  		if _, err := conn.Write([]byte{byte(RPCTLS)}); err != nil {
  			conn.Close()
  			return nil, nil, err
  		}
  
  		// Wrap the connection in a TLS client
  		tlsConn, err := p.TLSWrapper(dc, conn)
  		if err != nil {
  			conn.Close()
  			return nil, nil, err
  		}
  		conn = tlsConn
  	}
  
  	return conn, hc, nil
  }
docs: // DialTimeout is used to establish a raw connection to the given server, with a
  // given connection timeout.