From f56aaa10076c3e83c015696b90a155b36902e9c7 Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Sat, 9 Jul 2022 12:40:28 +0300 Subject: [PATCH] examples: simplify examples/websocket/ping.v (end automatically, when the client ends) --- examples/websocket/ping.v | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/examples/websocket/ping.v b/examples/websocket/ping.v index 23f027c340..82e8338611 100644 --- a/examples/websocket/ping.v +++ b/examples/websocket/ping.v @@ -1,15 +1,12 @@ module main import time -import os import net.websocket fn main() { - println('press enter to quit...\n') go start_server() time.sleep(100 * time.millisecond) - go start_client() - os.get_line() + start_client()? } // start_server starts the websocket server, it receives messages