code: func OnSessionClose(f func(s *Session)) {
  	sf1 := reflect.ValueOf(f)
  	for _, fun := range SessionCloseCallbacks {
  		sf2 := reflect.ValueOf(fun)
  		if sf1.Pointer() == sf2.Pointer() {
  			return
  		}
  	}
  	SessionCloseCallbacks = append(SessionCloseCallbacks, f)
  }
docs: // OnSessionClose adds a method that will be called when every session closes