jetty-eventsource-servlet icon indicating copy to clipboard operation
jetty-eventsource-servlet copied to clipboard

Add support for Last-Event-ID

Open marschall opened this issue 12 years ago • 0 comments

Adds support for Last-Event-ID. This is two fold. First the, ability to send an event id to the client is added. Second, a new method is added that is called with the Last-Event-ID if a connection is resumed.

This implementation has the limitation that the id has to be set before data or a generic event is sent. This is because these two methods currently finish a message (CRLF CRLF flush). Two alternatives would be to either overload these two methods or introduce a dedicated method that finishes a message. They both seem less attractive.

  • Add EventSource#onResume
  • Add Emitter#id

marschall avatar Apr 28 '12 11:04 marschall