Example #1
0
        static void Main(string[] args)
        {            
            var configLogingFileName = "Settings\\Logging.xml";
            XmlConfigurator.Configure(new FileInfo(configLogingFileName));

            var netConfiguration = new NetConfigurationImpl {
                //ServerHost = "192.168.1.66",
                ServerHost = "localhost",
                ServerPort = 9876
            };

            using (var controller = new GCSService(netConfiguration)) {                
                controller.OpenService();

                Console.WriteLine("Сервис запущен. Нажмите Enter для остановки.");
                Console.ReadLine();

                controller.CloseService();
            }            
        }
Example #2
0
        private void MakeClientInstance()
        {
            var configuration = new NetConfigurationImpl {
                ServerHost = Connection.Default["host"].ToString(),
                ServerPort = Convert.ToInt32(Connection.Default["port"])
            };

            client = new SGCClientImpl(configuration);
            client.ConnectionActionsListener = this;
        }