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

parser: check (mut f Foo) syntax

This commit is contained in:
yuyi
2020-05-17 19:51:18 +08:00
committed by GitHub
parent b138cadbcb
commit 7f4cf08516
87 changed files with 492 additions and 480 deletions

View File

@ -2,13 +2,13 @@ module websocket
fn C.write() int
fn (ws mut Client) write_to_server(buf voidptr, len int) int {
fn (mut ws Client) write_to_server(buf voidptr, len int) int {
mut bytes_written := 0
ws.write_lock.lock()
bytes_written = if ws.is_ssl {
C.SSL_write(ws.ssl, buf, len)
} else {
C.write(ws.socket.sockfd, buf, len)
C.write(ws.socket.sockfd, buf, len)
}
ws.write_lock.unlock()
return bytes_written