MCPcopy Create free account
hub / github.com/Monibuca/engine / Write

Method Write

util/sse.go:24–34  ·  view source on GitHub ↗
(data []byte)

Source from the content-addressed store, hash-verified

22}
23
24func (sse *SSE) Write(data []byte) (n int, err error) {
25 if err = sse.Err(); err != nil {
26 return
27 }
28 buffers := net.Buffers{sseBegin, data, sseEnd}
29 nn, err := buffers.WriteTo(sse.ResponseWriter)
30 if err == nil {
31 sse.ResponseWriter.(http.Flusher).Flush()
32 }
33 return int(nn), err
34}
35
36func (sse *SSE) WriteEvent(event string, data []byte) (err error) {
37 if err = sse.Err(); err != nil {

Callers

nothing calls this directly

Calls 2

FlushMethod · 0.65
WriteToMethod · 0.45

Tested by

no test coverage detected