Skip to main content

parse_sse_buffer

Function parse_sse_buffer 

Source
pub fn parse_sse_buffer(buffer: &str) -> (Vec<RawEvent>, String)
Expand description

Parses complete events out of buffer and returns them with the incomplete rest.

Follows the SSE spec: events are separated by blank lines, fields are field: value, and \r\n, \r and \n all end a line. Comments (:) and blocks without an event field are skipped, like the TS client.