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(); }
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(); }
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(); }