|
|
2 년 전 | |
|---|---|---|
| .. | ||
| Implementation | 2 년 전 | |
| Model | 2 년 전 | |
| Runtime | 2 년 전 | |
| README.md | 3 년 전 | |
This directory contains a simple echo server that demonstrates all four gRPC API styles (Unary, Server Streaming, Client Streaming, and Bidirectional Streaming) using the gRPC Swift.
There are four subdirectories:
Model/ containing the service and model definitions and generated code,Implementation/ containing the server implementation of the generated model,Runtime/ containing a CLI for the server and client using the NIO-based APIs.To start the server run:
swift run Echo server
By default the server listens on port 1234. The port may also be specified by
passing the --port option. Other options may be found by running:
swift run Echo server --help
To invoke the 'get' (unary) RPC with the message "Hello, World!" against the server:
swift run Echo client "Hello, World!"
Different RPC types can be called using the --rpc flag (which defaults to
'get'):
Additional options may be found by running:
swift run Echo client --help