Jan Tattermusch | a7608b0 | 2015-02-03 17:54:38 -0800 | [diff] [blame] | 1 | using System; |
2 | using System.Runtime.InteropServices; | ||||
3 | using Google.GRPC.Core; | ||||
4 | using System.Threading; | ||||
Jan Tattermusch | a7608b0 | 2015-02-03 17:54:38 -0800 | [diff] [blame] | 5 | |
Jan Tattermusch | eb3e76e | 2015-02-06 11:43:13 -0800 | [diff] [blame] | 6 | namespace math |
Jan Tattermusch | a7608b0 | 2015-02-03 17:54:38 -0800 | [diff] [blame] | 7 | { |
Jan Tattermusch | eb3e76e | 2015-02-06 11:43:13 -0800 | [diff] [blame] | 8 | class MathClient |
Jan Tattermusch | a7608b0 | 2015-02-03 17:54:38 -0800 | [diff] [blame] | 9 | { |
10 | public static void Main (string[] args) | ||||
11 | { | ||||
Jan Tattermusch | 23821ce | 2015-02-13 10:46:02 -0800 | [diff] [blame^] | 12 | GrpcEnvironment.Initialize(); |
13 | |||||
Jan Tattermusch | a7608b0 | 2015-02-03 17:54:38 -0800 | [diff] [blame] | 14 | using (Channel channel = new Channel("127.0.0.1:23456")) |
15 | { | ||||
Jan Tattermusch | 15111f5 | 2015-02-05 18:15:14 -0800 | [diff] [blame] | 16 | MathGrpc.IMathServiceClient stub = new MathGrpc.MathServiceClientStub(channel); |
Jan Tattermusch | eb3e76e | 2015-02-06 11:43:13 -0800 | [diff] [blame] | 17 | MathExamples.DivExample(stub); |
Jan Tattermusch | a7608b0 | 2015-02-03 17:54:38 -0800 | [diff] [blame] | 18 | |
Jan Tattermusch | eb3e76e | 2015-02-06 11:43:13 -0800 | [diff] [blame] | 19 | MathExamples.FibExample(stub); |
Jan Tattermusch | a7608b0 | 2015-02-03 17:54:38 -0800 | [diff] [blame] | 20 | |
Jan Tattermusch | eb3e76e | 2015-02-06 11:43:13 -0800 | [diff] [blame] | 21 | MathExamples.SumExample(stub); |
Jan Tattermusch | a7608b0 | 2015-02-03 17:54:38 -0800 | [diff] [blame] | 22 | |
Jan Tattermusch | eb3e76e | 2015-02-06 11:43:13 -0800 | [diff] [blame] | 23 | MathExamples.DivManyExample(stub); |
Jan Tattermusch | a7608b0 | 2015-02-03 17:54:38 -0800 | [diff] [blame] | 24 | } |
25 | |||||
26 | GrpcEnvironment.Shutdown(); | ||||
27 | } | ||||
28 | } | ||||
29 | } |