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

Function WithReadBufferSize

dialoptions.go:202–206  ·  view source on GitHub ↗

WithReadBufferSize lets you set the size of read buffer, this determines how much data can be read at most for each 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

200// disable read buffer for a connection so data framer can access the
201// underlying conn directly.
202func WithReadBufferSize(s int) DialOption {
203 return newFuncDialOption(func(o *dialOptions) {
204 o.copts.ReadBufferSize = s
205 })
206}
207
208// WithInitialWindowSize returns a DialOption which sets the value for initial
209// window size on a stream. The lower bound for window size is 64K and any value

Callers 5

buildConnectionsFunction · 0.92
makeClientsFunction · 0.92
createConnsFunction · 0.92
TestDisabledIOBuffersMethod · 0.92
TestJoinDialOptionMethod · 0.85

Calls 1

newFuncDialOptionFunction · 0.85

Tested by 2

TestDisabledIOBuffersMethod · 0.74
TestJoinDialOptionMethod · 0.68