code: func (s *Server) MiddlewareFunc(middleware ...func(ctx *ReqCtx) error) {
  	s.middleware = append(s.middleware, middleware...)
  }
docs: // MiddlewareFunc registers middleware function to handle incoming request messages.