adoontheway/nano-client-ts

Is there any disconnection and reconnection? 有断线重连吗

a982246809 opened this issue · 6 comments

Is there any disconnection and reconnection? 有断线重连吗

I want to use it in a vue project. Can it be used?
我想在vue项目中使用可以吗?

  1. vue不能直接使用,需要做一些改动,比如:去掉一些cocos的类,替换成js原生的,这个你自己拉个分支就,花几分钟就可以搞定
  2. 有支持重连,具体逻辑参考nano.ts line-170

这里有原生的websocket-js版本: nano-websocket-client
我做的这个版本就是根据这个nano js版本改来的

nano-websocket-client它这个断线 有问题

断线久了 就连回来了

我草 reconnect竟然默认是false