Ejemplo n.º 1
0
// 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
}
Ejemplo n.º 2
0
// 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)
}