How to use the @stomp/stompjs.over function in @stomp/stompjs

To help you get started, we’ve selected a few @stomp/stompjs examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github bluecolor / octopus / frontend / src / store / modules / users.js View on Github external
listen ({commit}) {
    const socket = new SockJS('/socket')
    const stomp = Stomp.over(socket)
    stomp.connect({}, f => {
      stomp.subscribe(`/topic/task-instance-error`, d => {
        commit(NOTIFY_TASK_ERR, d)
      })
    }, e => {
      console.log(e)
    })
  },
  pollMe ({commit}) {
github g00glen00b / spring-boot-angular-websockets / angular-websockets-client / src / app / core / socket-client.service.ts View on Github external
constructor() {
    this.client = over(new SockJS(environment.api));
    this.state = new BehaviorSubject(SocketClientState.ATTEMPTING);
    this.client.connect({}, () => {
      this.state.next(SocketClientState.CONNECTED);
    });
  }

@stomp/stompjs

STOMP client for Javascript and Typescript

Apache-2.0
Latest version published 2 years ago

Package Health Score

56 / 100
Full package analysis