|
|
%!s(int64=4) %!d(string=hai) anos | |
|---|---|---|
| .. | ||
| Client | %!s(int64=5) %!d(string=hai) anos | |
| Model | %!s(int64=4) %!d(string=hai) anos | |
| Server | %!s(int64=5) %!d(string=hai) anos | |
| README.md | %!s(int64=5) %!d(string=hai) anos | |
This directory contains a 'Hello World' gRPC example, a single service with just
one RPC for saying hello. The quick-start tutorial which accompanies this
example lives in docs/ directory of this project.
To start the server run:
swift run HelloWorldServer
Note the port the server is listening on.
To send a message to the server run the following, replacing <PORT> with the
port the server is listening on:
swift run HelloWorldClient <PORT>
You may also greet a particular person (or dog). For example, to greet PanCakes on a server listening on port 1234 run:
swift run HelloWorldClient 1234 "PanCakes"