// Server handler functions func (handler *ServerHandler) NewConnection(serverConn rtmp.ServerConn, connectReq *rtmp.Command, server *rtmp.Server) bool { //log.Printf("[%s] attaching handler for new connection", serverConn.Conn().Id()) serverConn.Attach(handler) return true }
// ServerConnHandler methods func (handler *ServerHandler) OnStatus(conn rtmp.ServerConn) { status, err := conn.Status() log.Printf("OnStatus: %d (%s), err: %v\n", status, rtmp.StatusDisplay(status), err) }