func startDialWebsocket(ctx context.Context, try *parallel.Try, ipAddr, addr, path string, opts dialOpts) error {
	var openAttempt retry.Strategy
	if opts.RetryDelay > 0 {
		openAttempt = retry.Regular{
			Total: opts.Timeout,
			Delay: opts.RetryDelay,
			Min:   int(opts.Timeout / opts.RetryDelay),
		}
	} else {
		// Zero retry delay implies exactly one try.
		openAttempt = oneAttempt
	}
	d := dialer{
		ctx:         ctx,
		openAttempt: openAttempt,
		serverName:  opts.sniHostName,
		ipAddr:      ipAddr,
		urlStr:      "wss://" + addr + path,
		addr:        addr,
		opts:        opts,
	}
	return try.Start(d.dial)
}
// startDialWebsocket starts websocket connection to a single address
// on the given try instance.
startDialWebsocket starts websocket connection to a single address
on the given try instance.
// startDialWebsocket starts websocket connection to a single address // on the given try instance .
func startDialWebsocket(ctx context.Context, try *parallel.Try, ipAddr, addr, path string, opts dialOpts) error {
	var openAttempt retry.Strategy
	if opts.RetryDelay > 0 {
		openAttempt = retry.Regular{
			Total: opts.Timeout,
			Delay: opts.RetryDelay,
			Min:   int(opts.Timeout / opts.RetryDelay),
		}
	} else {
		openAttempt = oneAttempt
	}
	d := dialer{
		ctx:         ctx,
		openAttempt: openAttempt,
		serverName:  opts.sniHostName,
		ipAddr:      ipAddr,
		urlStr:      "wss://" + addr + path,
		addr:        addr,
		opts:        opts,
	}
	return try.Start(d.dial)
}
func startDialWebsocket ( ctx context . Context , try * parallel . Try , ipAddr , addr , path string , opts dialOpts ) error { var openAttempt retry . Strategy if opts . RetryDelay > 0 { openAttempt = retry . Regular { Total : opts . Timeout , Delay : opts . RetryDelay , Min : int ( opts . Timeout / opts . RetryDelay ) , } } else { openAttempt = oneAttempt } d := dialer { ctx : ctx , openAttempt : openAttempt , serverName : opts . sniHostName , ipAddr : ipAddr , urlStr : " " + addr + path , addr : addr , opts : opts , } return try . Start ( d . dial ) }
startDialWebsocket starts websocket connection to a single address
on the given try instance.
startDialWebsocket starts websocket connection to a single address on the given try instance .
// Zero retry delay implies exactly one try.