IOT-DSA/sdk-dslink-dart

implement client ws/http reconnect

rinick opened this issue · 0 comments

  1. when a connected ws connection get disconnected, try ws connection again. (make a new connection class but reuse old link/responder/requester class)
  2. when ws connection failed (eigher first connecting or reconnecting failed), connect again with http.
  3. in http mode need to cache the last sent request, if http connection timeout, resend the request instead of kill connection.

these 3 reconnection shouldn't need to reconnection to /conn end point, but can be done directly with ws or http end point.
but when client receive a authenticaiton error, it has to re-connect to /conn to get a new secret nonce.