mirror of
https://github.com/gin-gonic/gin.git
synced 2025-10-16 05:16:35 +08:00
Merge 4d47c2afd7b61ab5201e4a4cb3fbc05e92fd1e1c into 44d0dd70924dd154e3b98bc340accc53484efa9c
This commit is contained in:
commit
a0119565b2
@ -1078,7 +1078,9 @@ func (c *Context) SSEvent(name string, message any) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Stream sends a streaming response and returns a boolean
|
// Stream sends a streaming response and returns a boolean
|
||||||
// indicates "Is client disconnected in middle of stream"
|
// indicates "Will the client be connected in middle of stream"
|
||||||
|
// i.e. if return true, the client will keep connected
|
||||||
|
// if return false, the client will be disconnected
|
||||||
func (c *Context) Stream(step func(w io.Writer) bool) bool {
|
func (c *Context) Stream(step func(w io.Writer) bool) bool {
|
||||||
w := c.Writer
|
w := c.Writer
|
||||||
clientGone := w.CloseNotify()
|
clientGone := w.CloseNotify()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user