MCPcopy Index your code
hub / github.com/Monibuca/engine / API_stop_subscribe

Method API_stop_subscribe

http.go:218–234  ·  view source on GitHub ↗
(w http.ResponseWriter, r *http.Request)

Source from the content-addressed store, hash-verified

216}
217
218func (conf *GlobalConfig) API_stop_subscribe(w http.ResponseWriter, r *http.Request) {
219 q := r.URL.Query()
220 streamPath := q.Get("streamPath")
221 id := q.Get("id")
222 s := Streams.Get(streamPath)
223 if s == nil {
224 util.ReturnError(util.APIErrorNoStream, NO_SUCH_STREAM, w, r)
225 return
226 }
227 suber := s.Subscribers.Find(id)
228 if suber == nil {
229 util.ReturnError(util.APIErrorNoSubscriber, "no such subscriber", w, r)
230 return
231 }
232 suber.Stop(zap.String("reason", "stop by api"))
233 util.ReturnOK(w, r)
234}
235
236func (conf *GlobalConfig) API_replay_rtpdump(w http.ResponseWriter, r *http.Request) {
237 q := r.URL.Query()

Callers

nothing calls this directly

Calls 6

ReturnErrorFunction · 0.92
ReturnOKFunction · 0.92
FindMethod · 0.80
StopMethod · 0.65
GetMethod · 0.45
StringMethod · 0.45

Tested by

no test coverage detected