send method
Implementation
void send(Object data) {
if (connectionStatus == ConnectionStatus.closed) {
connect();
}
if (socket != null && socket!.readyState == html.WebSocket.OPEN) {
socket!.send(data.toJSBox);
} else {
Get.log('WebSocket not connected, message $data not sent');
}
}