onConnectedwith an error if the
SseClientreceives an error before the connection is successfully opened.
SseConnectionstream would result in an error.
doneevent to the connection
onOpengetter. Messages will now be buffered until a connection is established.
** 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.
SseConnectionto allow closing connections immediately, ignoring any keep-alive periods.
SseConnectionand ensure the corresponding
onCloseevent to the
SseConnection. This allows consumers to listen to this event in lue of
sseConnection.sink.doneas that is not guaranteed to fire.
keepAlivemay cause state errors when attempting to send messages on a closed stream.
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.
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.
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.
Possible Breaking Change Error messages may now be delayed up to 5 seconds in the client.
SseConnection. This is simply handled by the underlying
SseConnectionwere not properly closed.