Repository: grpc/grpc-go
File: dialoptions.go (Go)

Code before:
// window size on a stream. The lower bound for window size is 64K and any value
// smaller than that will be ignored.
func WithInitialWindowSize(s int32) DialOption {
	return newFuncDialOption(func(o *dialOptions) {
		o.copts.StaticWindowSize = s
		o.copts.BdpEstimationEnabled = false
	})
}

// WithInitialConnWindowSize returns a DialOption which sets the value for
// initial window size on a connection. The lower bound for window size is 64K
// and any value smaller than that will be ignored.
func WithInitialConnWindowSize(s int32) DialOption {
	return newFuncDialOption(func(o *dialOptions) {
		o.copts.StaticConnWindowSize = s
		o.copts.BdpEstimationEnabled = false
	})
}

// WithStaticStreamWindowSize returns a DialOption which sets the initial
// stream window size to the value provided and prevents dynamic flow control
// from adjusting it
func WithStaticStreamWindowSize(s int32) DialOption {
	return newFuncDialOption(func(o *dialOptions) {
		o.copts.StaticWindowSize = s
		o.copts.BdpEstimationEnabled = true
	})
}

// WithStaticConnWindowSize returns a DialOption which sets the initial
// connection window size to the value provided and prevents dynamic flow control
// from adjusting it
func WithStaticConnWindowSize(s int32) DialOption {
	return newFuncDialOption(func(o *dialOptions) {
		o.copts.StaticConnWindowSize = s
		o.copts.BdpEstimationEnabled = true
	})
}

// WithMaxMsgSize returns a DialOption which sets the maximum message size the
// client can receive.
//
// Deprecated: use WithDefaultCallOptions(MaxCallRecvMsgSize(s)) instead.  Will
// be supported throughout 1.x.
func WithMaxMsgSize(s int) DialOption {
	return WithDefaultCallOptions(MaxCallRecvMsgSize(s))
}

// WithDefaultCallOptions returns a DialOption which sets the default
// CallOptions for calls over the connection.
func WithDefaultCallOptions(cos ...CallOption) DialOption {

Review comment (suggestion):
I dont think this needs to go in this PR , according to Doug's comment and the issue also , for the 1st PR , we just want to introduce new settings : `WithStaticStreamWindowSize` , `WithStaticConnWindowSize` that does exactly what the old settings do. And do not change anything in the old settings.

The change should happen in internal usage which you have done. 
And the 2nd PR (After 2 releases , as mentioned [here](https://github.com/grpc/grpc-go/issues/7923#issuecomment-2549600066)) should make the `o.copts.BdpEstimationEnabled=true` in `WithInitialConnWindowSize`
```suggestion
		o.copts.BdpEstimationEnabled = false
```

Code after:
// window size on a stream. The lower bound for window size is 64K and any value
// smaller than that will be ignored.
func WithInitialWindowSize(s int32) DialOption {
	return newFuncDialOption(func(o *dialOptions) {
		o.copts.InitialWindowSize = s
		o.copts.StaticWindowSize = true
	})
}

// WithInitialConnWindowSize returns a DialOption which sets the value for
// initial window size on a connection. The lower bound for window size is 64K
// and any value smaller than that will be ignored.
func WithInitialConnWindowSize(s int32) DialOption {
	return newFuncDialOption(func(o *dialOptions) {
		o.copts.InitialConnWindowSize = s
		o.copts.StaticWindowSize = true
	})
}

// WithStaticStreamWindowSize returns a DialOption which sets the initial
// stream window size to the value provided and disables dynamic flow control.
func WithStaticStreamWindowSize(s int32) DialOption {
	return newFuncDialOption(func(o *dialOptions) {
		o.copts.InitialWindowSize = s
		o.copts.StaticWindowSize = true
	})
}

// WithStaticConnWindowSize returns a DialOption which sets the initial
// connection window size to the value provided and disables dynamic flow
// control.
func WithStaticConnWindowSize(s int32) DialOption {
	return newFuncDialOption(func(o *dialOptions) {
		o.copts.InitialConnWindowSize = s
		o.copts.StaticWindowSize = true
	})
}

// WithMaxMsgSize returns a DialOption which sets the maximum message size the
// client can receive.
//
// Deprecated: use WithDefaultCallOptions(MaxCallRecvMsgSize(s)) instead.  Will
// be supported throughout 1.x.
func WithMaxMsgSize(s int) DialOption {
	return WithDefaultCallOptions(MaxCallRecvMsgSize(s))
}

// WithDefaultCallOptions returns a DialOption which sets the default
// CallOptions for calls over the connection.
func WithDefaultCallOptions(cos ...CallOption) DialOption {
	return newFuncDialOption(func(o *dialOptions) {