MCPcopy
hub / github.com/grpc/grpc-go / ReadBufferSize

Function ReadBufferSize

server.go:274–278  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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.
274func 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.

Callers 4

makeClientsFunction · 0.92
startBenchmarkServerFunction · 0.92
mainFunction · 0.92
TestDisabledIOBuffersMethod · 0.92

Calls 1

newFuncServerOptionFunction · 0.85

Tested by 1

TestDisabledIOBuffersMethod · 0.74