Websocket and stuffs

This commit is contained in:
aditya.chandel
2024-12-19 16:10:08 -07:00
parent 9e3b45fffc
commit e175a7e255
24 changed files with 569 additions and 496 deletions
+30
View File
@@ -0,0 +1,30 @@
import { RxStompConfig } from '@stomp/rx-stomp';
export const myRxStompConfig: RxStompConfig = {
// Which server?
brokerURL: 'ws://localhost:8080/ws',
// Headers
// Typical keys: login, passcode, host
connectHeaders: {
login: 'guest',
passcode: 'guest',
},
// How often to heartbeat?
// Interval in milliseconds, set to 0 to disable
heartbeatIncoming: 0, // Typical value 0 - disabled
heartbeatOutgoing: 20000, // Typical value 20000 - every 20 seconds
// Wait in milliseconds before attempting auto reconnect
// Set to 0 to disable
// Typical value 500 (500 milli seconds)
reconnectDelay: 200,
// Will log diagnostics on console
// It can be quite verbose, not recommended in production
// Skip this key to stop logging to console
debug: (msg: string): void => {
//console.log(new Date(), msg);
},
};