//:build !wasm package ws // Dial opens a WebSocket connection. Callbacks are JS callback IDs // from dom.RegisterCallback. Returns connection handle. func Dial(url string, onMessage func(int32, string), onOpen func(int32), onClose func(int32, int32, string), onError func(int32)) (c Conn) { panic("jsbridge") } // Send sends a string message. Returns true if sent. func Send(conn Conn, msg string) (ok bool) { panic("jsbridge") } // Close closes the connection. func Close(conn Conn) { panic("jsbridge") } // ReadyState returns the WebSocket readyState. // 0=CONNECTING, 1=OPEN, 2=CLOSING, 3=CLOSED, -1=invalid func ReadyState(conn Conn) (n int32) { panic("jsbridge") }