Skip to content

Commit 91c6506

Browse files
authored
Update geerpc-day1.md
1 parent 9898515 commit 91c6506

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

gee-rpc/doc/geerpc-day1.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ var DefaultOption = &Option{
183183
}
184184
```
185185

186-
一般来说,涉及协议协商的这部分信息,需要设计固定的字节来传输的。但是为了实现上更简单,GeeRPC 客户端固定采用 JSON 编码 Option,后续的 header 和 body 的编码方式由 Option 中的 CodeType 指定,服务端首先使用 JSON 解码 Option,然后通过 Option CodeType 解码剩余的内容。即报文将以这样的形式发送:
186+
一般来说,涉及协议协商的这部分信息,需要设计固定的字节来传输的。但是为了实现上更简单,GeeRPC 客户端固定采用 JSON 编码 Option,后续的 header 和 body 的编码方式由 Option 中的 CodeType 指定,服务端首先使用 JSON 解码 Option,然后通过 Option CodeType 解码剩余的内容。即报文将以这样的形式发送:
187187

188188
```bash
189189
| Option{MagicNumber: xxx, CodecType: xxx} | Header{ServiceMethod ...} | Body interface{} |
@@ -439,4 +439,4 @@ reply: geerpc resp 4
439439
## 附 推荐阅读
440440

441441
- [Go 语言简明教程](https://geektutu.com/post/quick-golang.html)
442-
- [Go 语言笔试面试题](https://geektutu.com/post/qa-golang.html)
442+
- [Go 语言笔试面试题](https://geektutu.com/post/qa-golang.html)

0 commit comments

Comments
 (0)