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
6
votes
0 answers

/sockjs-node/info?t=1515290831331 after deploying MEAN app to Heroku

I'm using the starter provided by mean.io for a simple MEAN application. Under development I don't have issues with sockjs-node requests: http://localhost:3000/sockjs-node/info?t=1515290831331 However, once I deploy on Heroku, the application fails…
areales
  • 121
  • 1
  • 1
  • 6
6
votes
0 answers

How to combine Spring Security and js sockjs-client

I want to create a Spring Server and a Broswer javascript client connecting via sockjs-client. The connection should be secured via Spring Security. I have the following dilemma: Spring Security seems to assume that the websocket handshake happens…
tkruse
  • 10,222
  • 7
  • 53
  • 80
6
votes
1 answer

Spring Stomp over Websocket: Message/Buffer/Cache/Stream limits

Could not understand the different parameters in the stomp over websocket config I am using for developing a chat application that involves images/vidoes: I notice that the SockJs in webpage, sends message with a frame size of 16K. I also tested…
kukkuz
  • 41,512
  • 6
  • 59
  • 95
6
votes
2 answers

SockJS -> Infinite xhr-streaming calls after reconnect

im using Stomp over SockJS and Spring websockets as backend. Occasionally Im having problems after my stomp client reconnect (wifi loss, server down, other). The connection is perfectly restored but passed few seconds i can see in browser network…
6
votes
3 answers

spring boot rest and angular2 with websocket (stomp over sockjs)

Is it possible to use stomp over sockjs without MVC. So I would like to have spring rest interface in tomcat, and angular2 application run by express. WebSocketConfig.java @Configuration @EnableWebSocketMessageBroker public class WebSocketConfig…
Admir Sabanovic
  • 645
  • 1
  • 11
  • 18
6
votes
3 answers

Is there a way to do a tcp connection to an IP with javascript?

Let me give a little background on what I am trying to accomplish. I have a device(chip and pin Terminal) that has a local IP address, It has been programmed to receive certain data and process it. example: I send the string "05" in hex "30 35" and…
Derek
  • 2,927
  • 3
  • 20
  • 33
6
votes
1 answer

Dynamic queues not created when subscribing to topic Spring WebSocket with STOMP?

I am developing push notification to all subset of users who subscribed to particular event. User subscribes to topic in RabbitMQ with format: user-id.event-type.id. I use Spring Websocket, Stomp, RabbitMQ and on frontend SockJS and Angular…
Abzal Kalimbetov
  • 505
  • 7
  • 20
6
votes
1 answer

Secured WebSocket upgrade over STOMP via SockJS fails with Invalid Upgrade header null

I am working on a web application that uses Spring Security and WebSockets. I am able to use the WebSockets without issue from my local machine, running the Spring Boot app from the JAR with embedded Tomcat. However, when I upload the same…
6
votes
1 answer

Configure External Broker(RabbitMQ) In Spring4+STOMP+SockJS Application

I am working on a chat application developed using Spring4 Messaging and STOMP implemented with SockJS. The application works fine when I use the Simple Message Broker : config.enableSimpleBroker("/queue/", "/topic/"); But, now we have a…
Gurminder Singh
  • 1,755
  • 16
  • 19
6
votes
3 answers

Spring 4 AbstractWebSocketMessageBrokerConfigurer With SockJS Not Negotiating Transport Properly

So I must say that all of the websocket tutorials/examples appear to be so easy, but it seems you really have to dig to find really important pieces of information that are left out of the simple examples. I'm stil having quite a few issues with my…
Bal
  • 2,027
  • 4
  • 25
  • 51
6
votes
4 answers

Stomp over socket using sockjs can't connect with Spring 4 WebSocket

Trying to use Spring 4 WebSocket with STOMP over socket using sockjs. And i faced a problem. My configuration: websocket.xml - part of spring context
dikkini
  • 1,184
  • 1
  • 23
  • 52
6
votes
1 answer

Spring 4 websockets dynamic MessageMapping not executed

I'm using Spring 4 websockets on Tomcat 8 and I have the following configuration:
g00glen00b
  • 41,995
  • 13
  • 95
  • 133
6
votes
1 answer

What is the maximal size for SockJS messages?

I'm using Vert.x and SockJS to transfer data encapsulated in messages. Is there a specification how big the SockJS/Websocket messages can be?
phil
  • 1,377
  • 2
  • 9
  • 14
5
votes
1 answer

Spring boot Websockets Handshake failed due to invalid Upgrade header: null

I am using spring boot 2.1.6 RELEASE, trying to use Stomp websockets for push notifications. I have taken reference from here : https://github.com/netgloo/spring-boot-samples/tree/master/spring-boot-web-socket-user-notification Things work fine in…
Vishal_Kotecha
  • 481
  • 5
  • 19
5
votes
1 answer

Is there a way to catch the close event in the websocket connection?

I am implementing a WebSockets connection in my platform. I'm using Angular 10 in the frontend and StompJS 2.3.3 over SockJS Client 1.5.0 for establishing the connection to the backend. I created a WebSockets service to manage the connection, and…