| 10 | using Socket = co_context::socket; |
| 11 | |
| 12 | task<> send(Socket sock) { |
| 13 | // NOTE `getchar()` will block current thread |
| 14 | while (getchar()) { |
| 15 | for (int i = 0; i < times; ++i) { |
| 16 | co_await sock.send(message); |
| 17 | } |
| 18 | } |
| 19 | } |
| 20 | |
| 21 | task<> client() { |
| 22 | inet_address addr; |