Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(socketio): compatibility and memory footprint issues with the ses…
- Loading branch information
Showing
17 changed files
with
421 additions
and
163 deletions.
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
docs/tutorials/snippets/socketio/connection-state-recovery-configuration.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import {Configuration} from "@tsed/di"; | ||
import "@tsed/platform-express"; | ||
import "@tsed/socketio"; | ||
|
||
@Configuration({ | ||
socketIO: { | ||
// ... see configuration | ||
connectionStateRecovery: { | ||
// the backup duration of the sessions and the packets | ||
maxDisconnectionDuration: 2 * 60 * 1000, | ||
// whether to skip middlewares upon successful recovery | ||
skipMiddlewares: true | ||
} | ||
} | ||
}) | ||
export class Server {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.