From 20a7f2eaef690f6a3b7fa4f3b9dd55b2f8c14e73 Mon Sep 17 00:00:00 2001 From: Guangming Luo Date: Thu, 12 Oct 2023 11:33:11 +0800 Subject: [PATCH 1/2] Chore: Update README.md for new domain (#818) --- README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c0a39d346d..f4196eb536 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,10 @@ # CloudWeGo -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). +The CloudWeGo site is currently built with [Hugo](https://gohugo.io/). + +For CN users, please visit : [cloudwego.cn](https://www.cloudwego.cn/zh) ; +For Non-CN users, please visit: [cloudwego.io](https://www.cloudwego.io/) ## Prerequisites @@ -39,6 +42,6 @@ This project is overridden from [docsy](http://github.com/google/docsy), and we' ## Credits -The website is deployed on [Vercel](https://vercel.com/?utm_source=CloudWeGo&utm_campaign=oss). +The [cloudwego.io](https://www.cloudwego.io/) website is deployed on [Vercel](https://vercel.com/?utm_source=CloudWeGo&utm_campaign=oss). ![Vercel](https://images.ctfassets.net/e5382hct74si/78Olo8EZRdUlcDUFQvnzG7/fa4cdb6dc04c40fceac194134788a0e2/1618983297-powered-by-vercel.svg) From cb4a92a69338a318a10a2314a85d460411142dca Mon Sep 17 00:00:00 2001 From: Felix021 Date: Thu, 12 Oct 2023 12:40:12 +0800 Subject: [PATCH 2/2] doc: update framed desc for frugal (#816) --- .../docs/kitex/Tutorials/advanced-feature/codec_frugal.md | 6 ++++-- .../docs/kitex/Tutorials/advanced-feature/codec_frugal.md | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/content/en/docs/kitex/Tutorials/advanced-feature/codec_frugal.md b/content/en/docs/kitex/Tutorials/advanced-feature/codec_frugal.md index 8c2d5773bf..02c9ab0192 100644 --- a/content/en/docs/kitex/Tutorials/advanced-feature/codec_frugal.md +++ b/content/en/docs/kitex/Tutorials/advanced-feature/codec_frugal.md @@ -173,9 +173,11 @@ For enabling Framed: prepend a 4-byte (int32) length to indicate the size of thr client.WithTransportProtocol(transport.Framed) ``` Note: -1. It's not necessary, but without it, the server side may not be able to decode with frugal (refer to: "Kitex Server -> Notes"); +1. If Framed is not set, there may be issues: + 1. The server may not be able to decode with frugal without Payload Size (refer to: "Kitex Server -> Notes"); + 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); 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); -3. `TTHeaderFramed` is an alternative. +3. `TTHeaderFramed` is an alternative (it's the BIT-OR result of `TTHeader | Framed`). ##### Example Code diff --git a/content/zh/docs/kitex/Tutorials/advanced-feature/codec_frugal.md b/content/zh/docs/kitex/Tutorials/advanced-feature/codec_frugal.md index aff1089442..3f613953f4 100644 --- a/content/zh/docs/kitex/Tutorials/advanced-feature/codec_frugal.md +++ b/content/zh/docs/kitex/Tutorials/advanced-feature/codec_frugal.md @@ -177,9 +177,11 @@ client.WithTransportProtocol(transport.Framed) ``` 注: -1. 非必须;如不指定 Framed,Server 端可能无法用 frugal 解码(详见 "Kitex Server -> 注意事项"); +1. 如不指定 Framed,可能存在如下问题: + 1. Server 端可能无法用 frugal 解码(因为读不到 Payload Size,详见 "Kitex Server -> 注意事项"); + 2. Server 端不会返回 Framed Payload,Client 可能无法用 frugal 解码(因为读不到 Payload Size); 2. 如果目标 Server 不支持 Framed,则不应指定。不影响 Client 侧使用 frugal 编码;但 Server 回包如不是 Framed,Client 可能无法用 frugal 解码(这种情况慎用 slim 模板); -3. 也可使用 TTHeaderFramed。 +3. 也可使用 TTHeaderFramed(即 `TTHeader | Framed` 位与结果)。 ##### 示例代码