ReadBufferSize lets you set the size of read buffer, this determines how much data can be read at most for one read syscall. The default value for this buffer is 32KB. Zero or negative values will disable read buffer for a connection so data framer can access the underlying conn directly.
(s int)
| 272 | // buffer is 32KB. Zero or negative values will disable read buffer for a |
| 273 | // connection so data framer can access the underlying conn directly. |
| 274 | func ReadBufferSize(s int) ServerOption { |
| 275 | return newFuncServerOption(func(o *serverOptions) { |
| 276 | o.readBufferSize = s |
| 277 | }) |
| 278 | } |
| 279 | |
| 280 | // InitialWindowSize returns a ServerOption that sets window size for stream. |
| 281 | // The lower bound for window size is 64K and any value smaller than that will be ignored. |