SSEvent writes a Server-Sent Event into the body stream.
(name string, message any)
| 1311 | |
| 1312 | // SSEvent writes a Server-Sent Event into the body stream. |
| 1313 | func (c *Context) SSEvent(name string, message any) { |
| 1314 | c.Render(-1, sse.Event{ |
| 1315 | Event: name, |
| 1316 | Data: message, |
| 1317 | }) |
| 1318 | } |
| 1319 | |
| 1320 | // Stream sends a streaming response and returns a boolean |
| 1321 | // indicates "Is client disconnected in middle of stream" |