Skip to content

Commit 20a988a

Browse files
authored
Merge branch 'main' into optimize-cache
2 parents 605f7bf + cb4a92a commit 20a988a

File tree

3 files changed

+13
-6
lines changed

3 files changed

+13
-6
lines changed

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22

33
# CloudWeGo
44

5-
The [cloudwego.io](https://www.cloudwego.io/) site is built with [Hugo](https://gohugo.io/) and hosted on [Vercel](https://vercel.com/?utm_source=CloudWeGo&utm_campaign=oss).
5+
The CloudWeGo site is currently built with [Hugo](https://gohugo.io/).
6+
7+
For CN users, please visit : [cloudwego.cn](https://www.cloudwego.cn/zh) ;
8+
For Non-CN users, please visit: [cloudwego.io](https://www.cloudwego.io/)
69

710
## Prerequisites
811

@@ -39,6 +42,6 @@ This project is overridden from [docsy](http://github.com/google/docsy), and we'
3942

4043
## Credits
4144

42-
The website is deployed on [Vercel](https://vercel.com/?utm_source=CloudWeGo&utm_campaign=oss).
45+
The [cloudwego.io](https://www.cloudwego.io/) website is deployed on [Vercel](https://vercel.com/?utm_source=CloudWeGo&utm_campaign=oss).
4346

4447
![Vercel](https://images.ctfassets.net/e5382hct74si/78Olo8EZRdUlcDUFQvnzG7/fa4cdb6dc04c40fceac194134788a0e2/1618983297-powered-by-vercel.svg)

content/en/docs/kitex/Tutorials/advanced-feature/codec_frugal.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,9 +173,11 @@ For enabling Framed: prepend a 4-byte (int32) length to indicate the size of thr
173173
client.WithTransportProtocol(transport.Framed)
174174
```
175175
Note:
176-
1. It's not necessary, but without it, the server side may not be able to decode with frugal (refer to: "Kitex Server -> Notes");
176+
1. If Framed is not set, there may be issues:
177+
1. The server may not be able to decode with frugal without Payload Size (refer to: "Kitex Server -> Notes");
178+
2. The server won't reply with a `Framed` payload, thus the Client may also not be able to decode with frugal (no Payload Size again);
177179
2. If the target server does not support `Framed`, then don't use it; the client can encode without it, but if the response (from the server) is not Framed (i.e. with preprended payload size), the client may not be able to decode with Frugal (so in this case, do not use slim template);
178-
3. `TTHeaderFramed` is an alternative.
180+
3. `TTHeaderFramed` is an alternative (it's the BIT-OR result of `TTHeader | Framed`).
179181

180182
##### Example Code
181183

content/zh/docs/kitex/Tutorials/advanced-feature/codec_frugal.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,9 +177,11 @@ client.WithTransportProtocol(transport.Framed)
177177
```
178178

179179
注:
180-
1. 非必须;如不指定 Framed,Server 端可能无法用 frugal 解码(详见 "Kitex Server -> 注意事项");
180+
1. 如不指定 Framed,可能存在如下问题:
181+
1. Server 端可能无法用 frugal 解码(因为读不到 Payload Size,详见 "Kitex Server -> 注意事项");
182+
2. Server 端不会返回 Framed Payload,Client 可能无法用 frugal 解码(因为读不到 Payload Size);
181183
2. 如果目标 Server 不支持 Framed,则不应指定。不影响 Client 侧使用 frugal 编码;但 Server 回包如不是 Framed,Client 可能无法用 frugal 解码(这种情况慎用 slim 模板);
182-
3. 也可使用 TTHeaderFramed。
184+
3. 也可使用 TTHeaderFramed(即 `TTHeader | Framed` 位与结果)
183185

184186
##### 示例代码
185187

0 commit comments

Comments
 (0)