2020-04-06 08:38:08 +02:00
|
|
|
use jirs_data::*;
|
2020-03-31 22:05:18 +02:00
|
|
|
|
2020-04-06 08:38:08 +02:00
|
|
|
pub fn send_ws_msg(msg: WsMsg) {
|
|
|
|
use crate::send_bin_code;
|
|
|
|
use wasm_bindgen::JsValue;
|
|
|
|
|
|
|
|
let binary = bincode::serialize(&msg).unwrap();
|
|
|
|
let data = JsValue::from_serde(&binary).unwrap();
|
|
|
|
send_bin_code(data);
|
|
|
|
}
|