You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/tutorials/basic/csharp.md
+5-6
Original file line number
Diff line number
Diff line change
@@ -52,7 +52,7 @@ service RouteGuide {
52
52
53
53
Then you define `rpc` methods inside your service definition, specifying their request and response types. gRPC lets you define four kinds of service method, all of which are used in the `RouteGuide` service:
54
54
55
-
- A *simple RPC* where the client sends a request to the server using the stub and waits for a response to come back, just like a normal function call.
55
+
- A *simple RPC* where the client sends a request to the server using the client object and waits for a response to come back, just like a normal function call.
56
56
57
57
```protobuf
58
58
// Obtains the feature at a given position.
@@ -123,9 +123,8 @@ To generate the code, the following command should be run from the `examples/csh
123
123
124
124
Running the appropriate command for your OS regenerates the following files in the RouteGuide directory:
125
125
126
-
-`RouteGuide/RouteGuide.cs` defines a namespace `Routeguide`
127
-
- This contains all the protocol buffer code to populate, serialize, and retrieve our request and response message types
128
-
-`RouteGuide/RouteGuideGrpc.cs`, provides stub and service classes
126
+
-`RouteGuide/RouteGuide.cs` contains all the protocol buffer code to populate, serialize, and retrieve our request and response message types
127
+
-`RouteGuide/RouteGuideGrpc.cs` provides generated client and server classes, including:
129
128
- an abstract class `RouteGuide.RouteGuideBase` to inherit from when defining RouteGuide service implementations
130
129
- a class `RouteGuide.RouteGuideClient` that can be used to access remote RouteGuide instances
131
130
@@ -284,9 +283,9 @@ As you can see, we build and start our server using `Grpc.Core.Server` class. To
284
283
285
284
In this section, we'll look at creating a C# client for our `RouteGuide` service. You can see our complete example client code in [examples/csharp/route_guide/RouteGuideClient/Program.cs](https://github.com/grpc/grpc/blob/{{ site.data.config.grpc_release_branch }}/examples/csharp/route_guide/RouteGuideClient/Program.cs).
286
285
287
-
### Creating a stub
286
+
### Creating a client object
288
287
289
-
To call service methods, we first need to create a *stub*.
288
+
To call service methods, we first need to create a client object (also referred to as *stub* for other gRPC languages).
290
289
291
290
First, we need to create a gRPC client channel that will connect to gRPC server. Then, we use the `RouteGuide.NewClient` method of the `RouteGuide` class generated from our .proto.
0 commit comments