Comments (11)
@loeffel-io The implementation adheres to the SSE specs on everything with the exception of supporting the retry
field. We use exponential backoff to determine when to reconnect, so it never made sense to support that usecase where that value is actually used, which isn't everywhere.
It's something that could be added easily however, or you can set your own reconnect strategy by setting ReconnectStrategy
from sse.
Hi!
As the library was released with a server implementation and was only intended to be used in conjunction with one another, there was never any emphasis on conforming to the EventSource Spec per say.
Given that this library is seeing more use than I anticipated, any changes to improve adherence to ES spec is a good thing.
So far the changes on your branch look great! :)
Once you've got something that you're happy to submit, please open a PR and i'll do some testing
Cheers
from sse.
Going to leave this open since retry isn't fully implemented.
from sse.
This library is also missing the retry
semantics and the handling of the Last-Event-ID
doesn't seem right.
from sse.
I've used this Python sse client library in production code and have looked at it's code quite a bit. It seems to follow the standard pretty closely and would be a good library to model.
from sse.
@purehyperbole What is the status of this? Isn't it implemented fully now to be complient with EventSources specifications?
from sse.
Any update on this?
from sse.
Thanks for the info @purehyperbole
from sse.
The implementation adheres to the SSE specs on everything with the exception of supporting the retry field.
Great news! I suggest changing the issue title to reflect this new state. I got a bit worried for a moment when evaluating if we should use this for a new project.
from sse.
FYI you can find spec compliant and optimised decoder here maybe you find it useful. You can use the decoder with any io.Reader
, so it should not be hard to integrate. You could ignore the rest of the primitives.
from sse.
Hi. We have noticed there is a mandatory query parameter "stream" in the server implementation. Without providing the parameter, the connection will not be established. This seems to be something that is not specified by the spec and will prevent to use this library with other sse client implementations.
Is it possible to make this parameter optional or completely remove it?
Thanks.
from sse.
Related Issues (20)
- Feature : callback function after client connected
- sse can not get empty data like url opend with chrome HOT 2
- Ignore comments (lines starting with colon - `:`) HOT 1
- Allow overrriding `OnSubscribe` and `OnUnsubscribe` functions per Stream.
- Any idea how to connect with Go Fiber framework?
- SSE client randomly dies HOT 2
- Client doesn't reconnect after EOF HOT 5
- OnConnect can be delayed
- OnConnect can be delayed HOT 1
- Feature Request: Support non-GET method and request body in the sse client HOT 1
- Improve receive message error handling
- Question: Cache mode of SSE client
- Custom http.Client? HOT 1
- Not all empty messages are actually ignored
- Need to process the body and status code of the response with an error
- Introduce EventLog BufferSize HOT 1
- Accessing headers in OnSubscribe HOT 1
- stream connection limits HOT 1
- consequences of the default recoonect strategy behaviour should be documented / made clear
- onSubscribe send a message to the subscriber
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sse.