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

Function MaxRecvMsgSize

server.go:450–454  ·  view source on GitHub ↗

MaxRecvMsgSize returns a ServerOption to set the max message size in bytes the server can receive. If this is not set, gRPC uses the default 4MB.

(m int)

Source from the content-addressed store, hash-verified

448// MaxRecvMsgSize returns a ServerOption to set the max message size in bytes the server can receive.
449// If this is not set, gRPC uses the default 4MB.
450func MaxRecvMsgSize(m int) ServerOption {
451 return newFuncServerOption(func(o *serverOptions) {
452 o.maxReceiveMessageSize = m
453 })
454}
455
456// MaxSendMsgSize returns a ServerOption to set the max message size in bytes the server can send.
457// If this is not set, gRPC uses the default `math.MaxInt32`.

Callers 5

listenAndServeMethod · 0.92
MaxMsgSizeFunction · 0.85
TestJoinServerOptionMethod · 0.85

Calls 1

newFuncServerOptionFunction · 0.85

Tested by 4

listenAndServeMethod · 0.74
TestJoinServerOptionMethod · 0.68