mirror of
https://github.com/apple/swift-nio
synced 2026-11-24 04:37:54 +00:00
* Add async TCP echo example # Motivation We introduced new async APIs to our bootstraps that make it easy to use NIO from Swift Concurrency. We should provide examples showing how to use those new APIs. In the future, we want to make those examples the primary ones and remove the non-async based ones. # Modification This PR introduces two new targets: `NIOTCPEchoServer` and `NIOTCPEchoClient`. Both targets are executable and provide either the server or client piece of the example. # Result New and shiny async example * Code review * Adopt NIO singletons * Review * George review
12 lines
355 B
Markdown
12 lines
355 B
Markdown
# NIOTCPEchoClient
|
|
|
|
This sample application provides a simple TCP echo client that will send multiple messages to an
|
|
echo server and wait for a response of all of them. Before running this client, make sure to start
|
|
the `NIOTCPEchoServer`.
|
|
|
|
To run this client execute the following from the root of the repository:
|
|
|
|
```bash
|
|
swift run NIOTCPEchoClient
|
|
```
|