mirror of
https://github.com/chai2010/advanced-go-programming-book.git
synced 2025-05-24 20:52:22 +00:00
ch4 fix typos
This commit is contained in:
parent
3e3a85291a
commit
0cca5dd780
@ -313,7 +313,7 @@ func main() {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
RPC的服务假设在“/jsonrpc”路径,在处理函数中基于http.ResponseWriter和http.Request类型的参数构造一个io.ReadWriteCloser类型的conn通道。然后基于conn构建针对服务端的json编码解码器。最后通过rpc.ServeRequest处理一次RPC方法调用。
|
RPC的服务架设在“/jsonrpc”路径,在处理函数中基于http.ResponseWriter和http.Request类型的参数构造一个io.ReadWriteCloser类型的conn通道。然后基于conn构建针对服务端的json编码解码器。最后通过rpc.ServeRequest处理一次RPC方法调用。
|
||||||
|
|
||||||
模拟一次RPC调用的过程就是向该链接发送一个json字符串:
|
模拟一次RPC调用的过程就是向该链接发送一个json字符串:
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user