joewalnes / reconnecting-websocket

A small decorator for the JavaScript WebSocket API that automatically reconnects

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

how to use these methods?

doubleLLL3 opened this issue · comments

There is no change when I use the method refresh() by ws.refresh() when they weren't connected. Why? And when they have been connected, they would just be disconnected and never connect again..
var ws = new ReconnectingWebSocket('ws://localhost:8866/view_tool'); $("#btn_reconnect").click(function(){ ws.refresh(); });

Finally, I use the method ws.open() to reconnect. But I still don't know why refresh() can't work.