WriteBufferSize determines how much data can be batched before doing a write on the wire. The default value for this buffer is 32KB. Zero or negative values will disable the write buffer such that each write will be on underlying connection. Note: A Send call may not directly translate to a write.
(s int)
| 262 | // values will disable the write buffer such that each write will be on underlying |
| 263 | // connection. Note: A Send call may not directly translate to a write. |
| 264 | func WriteBufferSize(s int) ServerOption { |
| 265 | return newFuncServerOption(func(o *serverOptions) { |
| 266 | o.writeBufferSize = s |
| 267 | }) |
| 268 | } |
| 269 | |
| 270 | // ReadBufferSize lets you set the size of read buffer, this determines how much |
| 271 | // data can be read at most for one read syscall. The default value for this |