1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

examples: simplify examples/websocket/ping.v (end automatically, when the client ends)

This commit is contained in:
Delyan Angelov 2022-07-09 12:40:28 +03:00
parent 7e1c45ab44
commit f56aaa1007
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED

View File

@ -1,15 +1,12 @@
module main module main
import time import time
import os
import net.websocket import net.websocket
fn main() { fn main() {
println('press enter to quit...\n')
go start_server() go start_server()
time.sleep(100 * time.millisecond) time.sleep(100 * time.millisecond)
go start_client() start_client()?
os.get_line()
} }
// start_server starts the websocket server, it receives messages // start_server starts the websocket server, it receives messages