diff --git a/docs/cn/client.md b/docs/cn/client.md old mode 100644 new mode 100755 index eba227df02..933f37c54b --- a/docs/cn/client.md +++ b/docs/cn/client.md @@ -1,3 +1,5 @@ +[English version](../en/client.md) + # 示例程序 Echo的[client端代码](https://github.com/brpc/brpc/blob/master/example/echo_c++/client.cpp)。 diff --git a/docs/en/client.md b/docs/en/client.md old mode 100644 new mode 100755 index 73cee21f6a..0f5ed8e4e3 --- a/docs/en/client.md +++ b/docs/en/client.md @@ -1,3 +1,5 @@ +[中文版](../cn/client.md) + # Example [client-side code](https://github.com/brpc/brpc/blob/master/example/echo_c++/client.cpp) of echo. @@ -11,7 +13,7 @@ - No class named brpc::Client. # Channel -Client-side sends requests. It's called [Channel](https://github.com/brpc/brpc/blob/master/src/brpc/channel.h) rather than "Client" in brpc. A channel represents a communication line to one server or multiple servers, which can be used for calling services. +Client-side of RPC sends requests. It's called [Channel](https://github.com/brpc/brpc/blob/master/src/brpc/channel.h) rather than "Client" in brpc. A channel represents a communication line to one server or multiple servers, which can be used for calling services. A Channel can be **shared by all threads** in the process. Yon don't need to create separate Channels for each thread, and you don't need to synchronize Channel.CallMethod with lock. However creation and destroying of Channel is **not** thread-safe, make sure the channel is initialized and destroyed only by one thread.