mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
vlib/net: add buffered IO, x.net -> net (#6754)
This commit is contained in:
@@ -111,7 +111,7 @@ fn (mut ws Client) read_handshake_str() ?string {
|
||||
mut msg := [1024]byte{}
|
||||
mut buffer := [1]byte{}
|
||||
for total_bytes_read < 1024 {
|
||||
bytes_read := ws.socket_read_into_ptr(byteptr(&buffer), 1) ?
|
||||
bytes_read := ws.socket_read_ptr(byteptr(&buffer), 1) ?
|
||||
if bytes_read == 0 {
|
||||
return error_with_code('unexpected no response from handshake', 5)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user