Пример #1
0
        public Client()
        {
            AutoInit.Init();
            MqttAdaptor = new MqttAdaptor(ConfigManager.MQIP(), ConfigManager.MQTTPort(),
                                          ConfigManager.MQUser(), ConfigManager.MQPass());
            GateAdaptor = new GateAdaptor("127.0.0.1", 6888);

            MqttAdaptor.Connected += () =>
            {
                BeginTest();
            };
            MqttAdaptor.BeginReceive();
            GateAdaptor.BeginReceive();
        }
Пример #2
0
        static void InitService()
        {
            AutoInit.Init();

            RoutingRule.DistrictsName = "test";

            GateAdaptor = new GateAdaptor("127.0.0.1", 6999);

            ServiceImplementStub.Bind <ICli2SceneImpl>(GateAdaptor, new SceneClientServiceImpl());

            Scene2CliService = new Scene2CliServiceDelegate(GateAdaptor);

            GateAdaptor.BeginReceive();
            //Heartbeat();
        }
Пример #3
0
        static void InitService()
        {
            AutoInit.Init();

            RoutingRule.DistrictsName = "test";

            GateAdaptor = new GateAdaptor("127.0.0.1", 6999);

            ServiceImplementStub.Bind<ICli2SceneImpl>(GateAdaptor, new SceneClientServiceImpl());

            Scene2CliService = new Scene2CliServiceDelegate(GateAdaptor);

            GateAdaptor.BeginReceive();
            //Heartbeat();
        }