mirror of
https://github.com/binwiederhier/ntfy.git
synced 2025-08-26 03:06:07 +02:00
Comments
This commit is contained in:
parent
c124434429
commit
09336fa1e4
9 changed files with 32 additions and 33 deletions
web/src/app
|
@ -2,6 +2,12 @@ import {basicAuth, encodeBase64Url, topicShortUrl, topicUrlWs} from "./utils";
|
|||
|
||||
const retryBackoffSeconds = [5, 10, 15, 20, 30];
|
||||
|
||||
/**
|
||||
* A connection contains a single WebSocket connection for one topic. It handles its connection
|
||||
* status itself, including reconnect attempts and backoff.
|
||||
*
|
||||
* Incoming messages and state changes are forwarded via listeners.
|
||||
*/
|
||||
class Connection {
|
||||
constructor(connectionId, subscriptionId, baseUrl, topic, user, since, onNotification, onStateChanged) {
|
||||
this.connectionId = connectionId;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue