update event_func.go for new protocol