diff options
| author | Felix Morgner <felix.morgner@gmail.com> | 2026-09-22 22:47:33 +0200 |
|---|---|---|
| committer | Felix Morgner <felix.morgner@gmail.com> | 2026-09-22 22:47:33 +0200 |
| commit | d05b9343f69a0841043963088e0003368e205bd9 (patch) | |
| tree | 8cde07ff86d27cbc808a0a149b89d0024b4a586c /apps/echo.cpp | |
| parent | 22f6534081acfabdab4956d337604a21e7da5b64 (diff) | |
| download | ttwhy-d05b9343f69a0841043963088e0003368e205bd9.tar.xz ttwhy-d05b9343f69a0841043963088e0003368e205bd9.zip | |
Diffstat (limited to 'apps/echo.cpp')
| -rw-r--r-- | apps/echo.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/apps/echo.cpp b/apps/echo.cpp index ab635a7..c13ef92 100644 --- a/apps/echo.cpp +++ b/apps/echo.cpp @@ -3,14 +3,13 @@ #include <stdio.h> -import ttwhy.io; -import ttwhy.routers; +import ttwhy.terminal; auto app(int in, int out, int error) -> asio::awaitable<void> { using namespace asio::experimental::awaitable_operators; - auto terminal_attributes = ttwhy::io::scoped_attributes{fileno(stdin)} // + auto terminal_attributes = ttwhy::terminal::scoped_attributes{fileno(stdin)} // .canonical_mode(false) .echo(false); @@ -20,10 +19,10 @@ auto app(int in, int out, int error) -> asio::awaitable<void> auto output_stream = asio::posix::stream_descriptor{executor, out}; auto error_stream = asio::posix::stream_descriptor{executor, error}; - auto router = ttwhy::routers::echo{output_stream}; + auto router = ttwhy::terminal::echo{output_stream}; - co_await (ttwhy::io::handle_signals(error_stream, terminal_attributes) || - ttwhy::io::read_events(input_stream, router)); + co_await (ttwhy::terminal::handle_signals(error_stream, terminal_attributes) || + ttwhy::terminal::read_events(input_stream, router)); } auto main() -> int |
