Questions tagged [sockjs]

SockJS is a browser JavaScript library that provides a WebSocket-like object that gives you a coherent, cross-browser, Javascript API which creates a low latency, full duplex, cross-domain communication channel between the browser and the web server.

SockJS is a browser JavaScript library that provides a WebSocket-like object. SockJS gives you a coherent, cross-browser, Javascript API which creates a low latency, full duplex, cross-domain communication channel between the browser and the web server.

Under the hood SockJS tries to use native WebSockets first. If that fails it can use a variety of browser-specific transport protocols and presents them through WebSocket-like abstractions.

SockJS-client is intended to work for all modern browsers and in environments which don't support WebSocket protocol, for example behind restrictive corporate proxies. [ https://github.com/sockjs/sockjs-client ]

SockJS-node is a Node.js server side counterpart of SockJS-client browser library written in CoffeeScript. [ https://github.com/sockjs/sockjs-node ]

650 questions
0
votes
1 answer

Websocket Broadcasting to different users with Spring web socket with SockJS

Currently in my application, a message is broadcast each 10 second with spring websockets. This is how the messages are broadcast to users in my spring application. …
Débora
  • 5,816
  • 28
  • 99
  • 171
0
votes
1 answer

SockJS multiple sockets

I have spring + SockJS application, that is using ActiveMQ as message broker. Can I have two sockets on same JSP page, one with sending and receiving ,and the other one only for receiving stomp messages(with lot of traffic).Is it guaranteed taht…
0
votes
1 answer

What are the available options when developing a decoupled, high scalable web application with server pushed events?

I would like to see if someone can clarify me some concepts I still don´t get about integration of web applications. Up until now, I´ve been working with CometD and Activemq in a project that´s been there for several years but, for what I´ve seen,…
Juan Vega
  • 1,030
  • 1
  • 16
  • 32
0
votes
1 answer

Websockets + SockJs: ConnectCallback not executing on client side when using stompclient

My issue is: $scope.socket = new SockJS("ws/ws"); $scope.stompClient = Stomp.over($scope.socket); // Connect to $scope.stompClient.connect("test", "test", connectCallback, errorCallback); function connectCallback…
abcd
  • 95
  • 2
  • 8
0
votes
1 answer

Unable to get ServletContext in Spring Controller when using Websockets

Client Code: $scope.socket = new SockJS("ws/ws"); $scope.stompClient = Stomp.over($scope.socket); $scope.stompClient.connect("guest", "guest",connectCallback, errorCallback); //in…
0
votes
1 answer

Spring Sock JS connection drops frequently on wildfly 8 server

I have an application which uses Spring Websocket. It works perfect on Tomcat/WAS -recently we tried to port it on Wildfly. There a sockjs connection is created but as soon as client sends a message the connection drops! I have enabled asyn support…
cpandey05
  • 1,241
  • 2
  • 17
  • 30
0
votes
0 answers

AngularJS two way binding now work with websockets

I connect to a server through websockets with sockJS. When subscribe messages are retrieving, it does not update the $scope. I use a service to encapsulate websocket connection. Here is my service function . …
Débora
  • 5,816
  • 28
  • 99
  • 171
0
votes
2 answers

How to define Spring WebSocket subscriber path

I want to know how to define the subscriber path. For instance, declaration of subscribing path stompClient.subscribe("/topic/simplemessagesresponse", function(servermessage) { Why there are two parts 'topic' and 'simplemessageresponse'…
Débora
  • 5,816
  • 28
  • 99
  • 171
0
votes
0 answers

Safari error 426 with sockjs/tornado and haproxy

UPDATE: While I do get the same errors, my web app now works. It was related to a coding bug that could've happened in any browser. Error 426 still does exist for me though using Safari 5.1.7 Based on scanning forums and E-mail groups, I understand…
FinDev
  • 4,437
  • 6
  • 29
  • 29
0
votes
1 answer

How i can handle DB events with SockJS

guys! I have rest api application. That app work with MongoDB, write some model example. How i can send some massage to all connection on SockJs server when i save some data in db?
siavolt
  • 6,869
  • 5
  • 24
  • 27
0
votes
1 answer

Websocket - can't connect from one machine, can from another

I have the following code: function connect() { var socket = new SockJS('/MyWebApp/wsdemo'); stompClient = Stomp.over(socket); stompClient.connect({}, function(frame) { setConnected(true); …
Urbanleg
  • 6,252
  • 16
  • 76
  • 139
0
votes
1 answer

Spring websocket end-poind and send message

I have an JMS listener, and I have to take the message, manipulate it and then redirect it to an page using websocket. Well, I’m just confused about the configuration, I have configured the WebSocketConfig: …
J.R.
  • 2,335
  • 2
  • 19
  • 21
0
votes
1 answer

how to prevent new connection on every page refresh in sockjs

So, every time I refresh the page, it seems like sockjs is creating a new connection. I am saving every message to my mongodb on every channel.onmessage, so if I refresh my page 7 times and send a message, I would save 7 messages of the same…
Eugene Choi
  • 113
  • 8
0
votes
2 answers

Stomp.js and Spring WebSocket integration with Web MVC project

I am having one spring project which is running with '*.htm' extension , we have bind it in web.xml file. dispatcher
Jaspreet Singh
  • 105
  • 1
  • 3
  • 10
0
votes
0 answers

What are the requirements to the type of XMLHttpRequest.onreadystatechange's status parameter

Do any standards require that the type of the status parameter in the XMLHttpRequest's readystatechange event is "number"? SockJs-0.3.4 expects to be able to say if (status === 200) { but when running under Intel XDK's App Framework, the type of…
Rasmus Faber
  • 48,631
  • 24
  • 141
  • 189