示例#1
0
        public static void StartService()
        {
            foreach (string project_id in SystemInternalSetting.Projects.Keys)
            {
                SocketHandler handler = new SocketHandler(SystemInternalSetting.Ip, SystemInternalSetting.Port);
                handlers.Add(project_id, handler);
            }

            foreach (DictionaryEntry de in handlers)
            {
                SocketHandler handler = de.Value as SocketHandler;
                handler.Start();

                string projectId = de.Key.ToString();
                string gatewayId = SystemInternalSetting.Projects[projectId].ToString();
                handler.Handshake(projectId, gatewayId);
            }
        }
示例#2
0
        public static void StartService()
        {
            foreach (string project_id in SystemInternalSetting.Projects.Keys)
            {
                SocketHandler handler = new SocketHandler(SystemInternalSetting.Ip, SystemInternalSetting.Port);
                handlers.Add(project_id, handler);
            }

            foreach (DictionaryEntry de in handlers)
            {
                SocketHandler handler = de.Value as SocketHandler;
                handler.Start();

                string projectId = de.Key.ToString();
                string gatewayId = SystemInternalSetting.Projects[projectId].ToString();
                handler.Handshake(projectId, gatewayId);
            }
        }