felangel / felangel/web_socket_client

feat: a function to generate URI before every connecting

未关闭
#31 2 条评论 7 个 reaction 已指派 0 人 在 GitHub 查看
enhancement
主要语言
Dart
星标
177
派生
44
PR 合并指标
30 天内没有已合并 PR

描述

**Description**

I want to add the user authentication token as query param to URI, but the token has short lifetime, while trying reconnect after token expires, there is no way to update the token, it will stuck looping.

```dart
WebSocket(
uri: () => "wss://localhost/?_token=xxxxx", // we can use the callback to retrieve valid token before connects.
);
```

**Requirements**

- [ ] A function to generate URI before every connect happens.

**Additional Context**

No.

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。