mirror of
https://github.com/apple/swift-nio.git
synced 2026-05-20 20:30:36 +00:00
8bf3316c37
Motivation: We're getting to the examples now! This patch updates NIOEchoClient to be clean under strict concurrency. Modifications: Use the sync operations to add echo handler. Result: Another strict concurrency module. Co-authored-by: George Barnett <gbarnett@apple.com>
NIOEchoClient
This sample application provides a simple echo client that will send a single line to an echo server and wait for a response. Invoke it using one of the following syntaxes:
swift run NIOEchoClient # Connects to a server on ::1, port 9999.
swift run NIOEchoClient 9899 # Connects to a server on ::1, port 9899
swift run NIOEchoClient /path/to/unix/socket # Connects to a server using the given UNIX socket
swift run NIOEchoClient echo.example.com 9899 # Connects to a server on echo.example.com:9899