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

test-cleancode: add the rest of vlib/x/websocket/

This commit is contained in:
Delyan Angelov
2020-12-28 07:25:46 +02:00
parent b65353794c
commit b7a5dbf7b4
10 changed files with 67 additions and 97 deletions

View File

@ -22,7 +22,7 @@ fn htonl64(payload_len u64) []byte {
fn create_masking_key() []byte {
mask_bit := byte(rand.intn(255))
buf := []byte{len: 4, init: `0`}
unsafe {C.memcpy(buf.data, &mask_bit, 4)}
unsafe { C.memcpy(buf.data, &mask_bit, 4) }
return buf
}