Is the utility library utility for Dragonfly that improves stability, protects against malicious packets, and adds several useful utilities.
- Recovery
- Antilag protection
- PPS Limit
- Protection against malicious packets
// enable antilag protection
monitoring.Config.PreventLags = true
monitoring.Config.PerformanceReporter = func(s *session.Session, c session.Controllable) {
// your actions against server lag
}
// customize your Recovery
monitoring.Config.Recovery = func(s *session.Session, c session.Controllable, err error) {
// printing panic message
fmt.Println(util.PanicMessage(err))
}
for p := range srv.Accept() {
monitoring.Enable(p)
}