Event writes one SSE event and flushes it to the client.
(event Event)
| 133 | |
| 134 | // Event writes one SSE event and flushes it to the client. |
| 135 | func (s *Stream) Event(event Event) error { |
| 136 | return s.write(func(w *bufio.Writer) error { |
| 137 | return writeEvent(w, event, s.jsonMarshal) |
| 138 | }) |
| 139 | } |
| 140 | |
| 141 | // Comment writes one SSE comment and flushes it to the client. |
| 142 | func (s *Stream) Comment(comment string) error { |