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

net.websocket: make thread safe/concurrent (#18179)

This commit is contained in:
kbkpbot
2023-05-18 17:27:00 +08:00
committed by GitHub
parent 1e88b1ab3e
commit c8d2098a14
8 changed files with 109 additions and 73 deletions

View File

@ -32,7 +32,7 @@ fn start_server() ! {
}
}
// Make that in execution test time give time to execute at least one time
s.ping_interval = 100
s.set_ping_interval(100)
s.on_connect(fn (mut s websocket.ServerClient) !bool {
slog('ws.on_connect, s.client_key: ${s.client_key}')
// Here you can look att the client info and accept or not accept