hashicorp / yamux

Golang connection multiplexing library
Mozilla Public License 2.0
2.25k stars 236 forks source link

How can I change the "initialStreamWindow" gracefully? #85

Closed xpiaoyu closed 4 years ago

xpiaoyu commented 4 years ago

The initialStreamWindow const in yamux is 256 * 1024. In some cases, the initial 256K window is too small and you have to wait for the window update. This will result in a longer wait for the buffering. So how can I enlarge the initialStreamWindow gracefully other than modifying yamux code.

xpiaoyu commented 4 years ago

After reading the source code, the window size will be updated immediately after the stream is opened.