Coming soon - Get a detailed view of why an account is flagged as spam!
view details

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

0
[AskJS] How do you implement Server Sent Events over HTTP2
Post Flair (click to view more posts with a particular flair)
Author Summary
IDontGiveA-Fuck is in AskJS
Post Body

So SSE has limitation of 6 simultaneous connections over HTTP1.1 and which can be overcome by using HTTP2 they say. Now what I'm not able to figure out is, how do I implement this in HTTP2?

In JS we just create EventSource object which subscribes to a endpoint and then we create listeners for different EventTypes server sends. From backbend (using springboot server with HTTP2 enabled, h2c) when I send a push notification, it always comes as HTTP1.1. I can't figure out what I'm doing wrong.

I've tested my server using curl --http2 that gives me HTTP2 protocol response so the backend is capable but not sure how to do that with JS EventSource.

Author
Account Strength
90%
Account Age
5 years
Verified Email
Yes
Verified Flair
No
Total Karma
1,147
Link Karma
51
Comment Karma
1,096
Profile updated: 1 month ago
Posts updated: 8 months ago

Subreddit

Post Details

Location
We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
3 years ago