mirror of
https://github.com/vlang/v.git
synced 2025-09-13 22:42:26 +03:00
examples: simplify examples/websocket/ping.v (end automatically, when the client ends)
This commit is contained in:
parent
7e1c45ab44
commit
f56aaa1007
1 changed files with 1 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue