mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
net.websocket: fix building client.v
This commit is contained in:
parent
271786b186
commit
1416c70e73
@ -1,6 +1,6 @@
|
||||
module websocket
|
||||
|
||||
fn (ws &Client) send_message_event(msg Message) {
|
||||
fn (ws &Client) send_message_event(msg &Message) {
|
||||
ws.eb.publish('on_message', ws, msg)
|
||||
l.d('sending on_message event')
|
||||
}
|
||||
|
@ -77,7 +77,7 @@ fn on_open(sender voidptr, ws &websocket.Client, x voidptr) {
|
||||
println('websocket opened.')
|
||||
}
|
||||
|
||||
fn on_message(sender voidptr, mut ws websocket.Client, msg websocket.Message) {
|
||||
fn on_message(sender voidptr, mut ws websocket.Client, msg &websocket.Message) {
|
||||
println('Message recieved. Sending it back.')
|
||||
typ := msg.opcode
|
||||
if typ == .text_frame {
|
||||
|
@ -479,7 +479,7 @@ pub fn (mut ws Client) read() int {
|
||||
return -1
|
||||
}
|
||||
}
|
||||
message := Message{
|
||||
message := &Message{
|
||||
opcode: frame.opcode
|
||||
payload: payload
|
||||
payload_len: int(payload_len)
|
||||
|
Loading…
Reference in New Issue
Block a user