sse 4.1.0 sse: ^4.1.0 copied to clipboard
Provides client and server functionality for setting up bi-directional communication through Server Sent Events (SSE) and corresponding POST requests.
- Limit the number of concurrent requests to prevent Chrome from automatically dropping them on the floor.
- Support null safety.
- Require the latest shelf and remove dead code.
onConnectedwith an error if the
SseClientreceives an error before the connection is successfully opened.
- Fix an issue where closing the
SseConnectionstream would result in an error.
- Fix an issue where failed requests would not add a
doneevent to the connection
- Deprecate the client's
onOpengetter. Messages will now be buffered until a connection is established.
- Drop dependency on
- Improve performance by buffering out of order messages in the server instead of the client.
** Note ** This is not modelled as a breaking change as the server can handle messages from older clients. However, clients should be using the latest server if they require order guarantees.
- Add new
SseConnectionto allow closing connections immediately, ignoring any keep-alive periods.
SseConnectionand ensure the corresponding
- Add an
onCloseevent to the
SseConnection. This allows consumers to listen to this event in lue of
sseConnection.sink.doneas that is not guaranteed to fire.
- Fix an issue where
keepAlivemay cause state errors when attempting to send messages on a closed stream.
- Fix an issue where
keepAlivewould only allow a single reconnection.
SseConnection. This flag will be
truewhen a connection has been dropped and is in the keep-alive period waiting for a client to reconnect.
- Fix an issue where the
SseClientwould not send a
doneevent when there was an error with the SSE connection.
Note that this is a breaking change but in actuality no one should be depending on this API.
- Add optional
keepAliveparameter to the
keepAliveis supplied, the connection will remain active for this period after a disconnect and can be reconnected transparently. If there is no reconnect within that period, the connection will be closed normally.
- Add retry logic.
Possible Breaking Change Error messages may now be delayed up to 5 seconds in the client.
- Use proper headers delimiter.
- Support Firefox.
- Fix an issue where messages could come out of order.
- Support the latest
- Require Dart SDK
- Update to
- No longer expose
SseConnection. This is simply handled by the underlying
- Fix a bug where resources of the
SseConnectionwere not properly closed.
- Internal cleanup.
- Initial commit.