2017-12-05 08:14:46 +00:00
|
|
|
#include "message_handler.h"
|
|
|
|
|
2017-12-06 05:03:38 +00:00
|
|
|
namespace {
|
2018-03-22 05:01:21 +00:00
|
|
|
struct In_Exit : public NotificationInMessage {
|
2018-03-22 04:05:25 +00:00
|
|
|
MethodType GetMethodType() const override { return kMethodType_Exit; }
|
2017-12-06 04:39:44 +00:00
|
|
|
};
|
2018-03-22 04:05:25 +00:00
|
|
|
MAKE_REFLECT_EMPTY_STRUCT(In_Exit);
|
|
|
|
REGISTER_IN_MESSAGE(In_Exit);
|
2017-12-06 04:39:44 +00:00
|
|
|
|
2018-03-22 04:05:25 +00:00
|
|
|
struct Handler_Exit : MessageHandler {
|
|
|
|
MethodType GetMethodType() const override { return kMethodType_Exit; }
|
2017-12-05 08:14:46 +00:00
|
|
|
|
2018-03-22 05:01:21 +00:00
|
|
|
void Run(std::unique_ptr<InMessage> request) override {
|
2017-12-05 08:14:46 +00:00
|
|
|
exit(0);
|
|
|
|
}
|
|
|
|
};
|
2018-03-22 04:05:25 +00:00
|
|
|
REGISTER_MESSAGE_HANDLER(Handler_Exit);
|
2017-12-31 03:18:33 +00:00
|
|
|
} // namespace
|