MCPcopy
hub / github.com/tinode/chat / lpWrite

Function lpWrite

server/hdl_longpoll.go:91–95  ·  view source on GitHub ↗
(wrt http.ResponseWriter, msg any)

Source from the content-addressed store, hash-verified

89}
90
91func lpWrite(wrt http.ResponseWriter, msg any) error {
92 // This will panic if msg is not []byte. This is intentional.
93 wrt.Write(msg.([]byte))
94 return nil
95}
96
97func (sess *Session) readOnce(wrt http.ResponseWriter, req *http.Request) (int, error) {
98 if req.ContentLength > globals.maxMessageSize {

Callers 2

sendMessageLpMethod · 0.85
writeOnceMethod · 0.85

Calls 1

WriteMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…