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

Function MaxConcurrentStreams

server.go:466–473  ·  view source on GitHub ↗

MaxConcurrentStreams returns a ServerOption that will apply a limit on the number of concurrent streams to each ServerTransport.

(n uint32)

Source from the content-addressed store, hash-verified

464// MaxConcurrentStreams returns a ServerOption that will apply a limit on the number
465// of concurrent streams to each ServerTransport.
466func MaxConcurrentStreams(n uint32) ServerOption {
467 if n == 0 {
468 n = math.MaxUint32
469 }
470 return newFuncServerOption(func(o *serverOptions) {
471 o.maxConcurrentStreams = n
472 })
473}
474
475// Creds returns a ServerOption that sets credentials for server connections.
476func Creds(c credentials.TransportCredentials) ServerOption {

Calls 1

newFuncServerOptionFunction · 0.85