WithWriteBufferSize 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 wri
(s int)
| 188 | // will be on underlying connection. Note: A Send call may not directly |
| 189 | // translate to a write. |
| 190 | func WithWriteBufferSize(s int) DialOption { |
| 191 | return newFuncDialOption(func(o *dialOptions) { |
| 192 | o.copts.WriteBufferSize = s |
| 193 | }) |
| 194 | } |
| 195 | |
| 196 | // WithReadBufferSize lets you set the size of read buffer, this determines how |
| 197 | // much data can be read at most for each read syscall. |