felangel / felangel/web_socket_client

feat: a function to generate URI before every connecting

オープン
#31 コメント 2 件 リアクション 7 件 担当者 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 を短くまとめたダイジェスト。