cubefs

Форк
0
49 строк · 1.6 Кб
1
/*
2
 *
3
 * Copyright 2018 gRPC authors.
4
 *
5
 * Licensed under the Apache License, Version 2.0 (the "License");
6
 * you may not use this file except in compliance with the License.
7
 * You may obtain a copy of the License at
8
 *
9
 *     http://www.apache.org/licenses/LICENSE-2.0
10
 *
11
 * Unless required by applicable law or agreed to in writing, software
12
 * distributed under the License is distributed on an "AS IS" BASIS,
13
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
 * See the License for the specific language governing permissions and
15
 * limitations under the License.
16
 *
17
 */
18

19
package transport
20

21
import (
22
	"math"
23
	"time"
24
)
25

26
const (
27
	// The default value of flow control window size in HTTP2 spec.
28
	defaultWindowSize = 65535
29
	// The initial window size for flow control.
30
	initialWindowSize             = defaultWindowSize // for an RPC
31
	infinity                      = time.Duration(math.MaxInt64)
32
	defaultClientKeepaliveTime    = infinity
33
	defaultClientKeepaliveTimeout = 20 * time.Second
34
	defaultMaxStreamsClient       = 100
35
	defaultMaxConnectionIdle      = infinity
36
	defaultMaxConnectionAge       = infinity
37
	defaultMaxConnectionAgeGrace  = infinity
38
	defaultServerKeepaliveTime    = 2 * time.Hour
39
	defaultServerKeepaliveTimeout = 20 * time.Second
40
	defaultKeepalivePolicyMinTime = 5 * time.Minute
41
	// max window limit set by HTTP2 Specs.
42
	maxWindowSize = math.MaxInt32
43
	// defaultWriteQuota is the default value for number of data
44
	// bytes that each stream can schedule before some of it being
45
	// flushed out.
46
	defaultWriteQuota              = 64 * 1024
47
	defaultClientMaxHeaderListSize = uint32(16 << 20)
48
	defaultServerMaxHeaderListSize = uint32(16 << 20)
49
)
50

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.