Could websocket support gzip compression?

WebSocket compression is enabled in some browsers by default (at the time of writing for example in Chrome, but not in Firefox). The client has to include the ‘Sec-WebSocket-Extensions: permessage-deflate’ header for this. If the server responds with the same extension, the WebSocket communication is compressed on a frame basis. As far as I know, … Read more

WebRTC vs WebSocket: If WebRTC can do Video, Audio, and Data, why do I need WebSocket? [closed]

WebRTC is designed for high-performance, high quality communication of video, audio and arbitrary data. In other words, for apps exactly like what you describe. WebRTC apps need a service via which they can exchange network and media metadata, a process known as signaling. However, once signaling has taken place, video/audio/data is streamed directly between clients, … Read more

Angular2 View Not Changing After Data Is Updated

So I finally found a solution that I like. Following the answer in this post How to update view after change in angular2 after google event listener fired I updated myList within zone.run() and now my data is updated in my view like expected. MyService.ts /// <reference path=”../../../typings/tsd.d.ts” /> // Import import {NgZone} from ‘angular2/angular2’; … Read more

What’s the best practice to renew a token for a WebSocket connection

Quite an old question I’ve asked, so I’d be happy to share our chosen practice: Once the client gets his JWT for the first time (when the application starts), a WebSocket is opened. To authenticate the channel, we send a message that we define as part of our protocol, called authMessage which contains that JWT. … Read more

Using WebSocket on Windows 7

No, websockets is only natively supported by Windows in Windows 8, regardless of which visual studio version you are using. http://www.paulbatum.com/2011/09/getting-started-with-websockets-in.html This is due to some low level issues in Windows 7 with http.sys. There’s an offchance it may be backported, but seems unlikely: http://weblogs.asp.net/owscott/archive/2012/03/01/what-s-new-in-iis-8.aspx To use websockets on Windows 7, you’ll have to write … Read more

What do these numbers mean in socket.io payload?

I know you asked a while ago, but the information remains for those who are researching. I did an analysis with reverse engineering in version 2.3.0 (socket.io) and 3.4.2 (engine.io) and got the following: The first number is the type of communication for engine.io, using the enumerator: Key Value 0 “open” 1 “close” 2 “ping” … Read more

Engine.io or SockJS, which one to choose?

Have you looked at Primus? It offers the cookie requirements you mention, it supports all of the major ‘real-time’/websocket libraries available and is a pretty active project. To me it also sounds like vendor lock-in could be a concern for you and Primus would address that. The fact that it uses a plugin system should … Read more

Websockets vs Reactive sockets

What is RSocket? RSocket implements the Reactive Streams specification over the network boundary. It is an application-level communication protocol with framing, session resumption, and backpressure built-in that works over the network. RSocket is transport agnostic. RSocket can be run over Websockets, TCP, HTTP/2, and Aeron. How does RSocket differ from Websockets? Websockets do not provide … Read more

Describe websocket api via Swagger

It seems to be possible using swagger-socket. Still, it seems that only a Java/Scala server implementation exists for now, which means they are not as much codegens for this that there is for “standard” Swagger REST services. Edit: As pointed out, this project seems to be dead. Unfortunately at the time of updating this answer, … Read more