diff --git a/vlib/net/websocket/events.v b/vlib/net/websocket/events.v index 688298dc67..53583baa72 100644 --- a/vlib/net/websocket/events.v +++ b/vlib/net/websocket/events.v @@ -2,32 +2,32 @@ module websocket // MessageEventHandler represents a callback on a new message struct MessageEventHandler { - handler SocketMessageFn // callback function - handler2 SocketMessageFn2 // callback function with reference + handler SocketMessageFn = unsafe { nil } // callback function + handler2 SocketMessageFn2 = unsafe { nil } // callback function with reference is_ref bool // true if has a reference object ref voidptr // referenced object } // ErrorEventHandler represents a callback on error struct ErrorEventHandler { - handler SocketErrorFn // callback function - handler2 SocketErrorFn2 // callback function with reference + handler SocketErrorFn = unsafe { nil } // callback function + handler2 SocketErrorFn2 = unsafe { nil } // callback function with reference is_ref bool // true if has a reference object ref voidptr // referenced object } // OpenEventHandler represents a callback when connection is opened struct OpenEventHandler { - handler SocketOpenFn // callback function - handler2 SocketOpenFn2 // callback function with reference + handler SocketOpenFn = unsafe { nil } // callback function + handler2 SocketOpenFn2 = unsafe { nil } // callback function with reference is_ref bool // true if has a reference object ref voidptr // referenced object } // CloseEventHandler represents a callback on a closing event struct CloseEventHandler { - handler SocketCloseFn // callback function - handler2 SocketCloseFn2 // callback function with reference + handler SocketCloseFn = unsafe { nil } // callback function + handler2 SocketCloseFn2 = unsafe { nil } // callback function with reference is_ref bool // true if has a reference object ref voidptr // referenced object }