/************************************************************
* Details: 网关，负责本地网络请求数据中转
* Encode: UTF-8
* Platform: Android & Linux
* Author: R&D 2
* Date: 2018-4-2
************************************************************/
#ifndef __GT_CORE_GATEWAY_H__
#define __GT_CORE_GATEWAY_H__

class GtGateway
{
    public:
        virtual ~GtGateway();
        static GtGateway *instance();
        void start();
        void stop();

    private:
        GtGateway();
        static GtGateway *_instance;
        static void *messageEntry(void *obj);
        static void *networkEntry(void *obj);
        void networkLoop();
        void messageLoop();
};

#endif
