MCPcopy Create free account
hub / github.com/daodst/chat / readOnce

Method readOnce

server/lphandler.go:77–83  ·  view source on GitHub ↗
(req *http.Request)

Source from the content-addressed store, hash-verified

75}
76
77func (sess *Session) readOnce(req *http.Request) {
78 if raw, err := ioutil.ReadAll(req.Body); err == nil {
79 sess.dispatch(raw)
80 } else {
81 log.Println("longPoll: " + err.Error())
82 }
83}
84
85// serveLongPoll handles long poll connections when WebSocket is not available
86// Connection could be without sid or with sid:

Callers 1

serveLongPollFunction · 0.80

Calls 2

dispatchMethod · 0.95
ErrorMethod · 0.45

Tested by

no test coverage detected