예제 #1
0
파일: Client.cs 프로젝트: ratulmukh/tashjik
        static TransportLayerCommunicator transportLayerCommunicator;         // = TransportLayerCommunicator.getRefTransportLayerCommunicator();

#if SIM
        public static void Main(string[] args)
        {
            Console.WriteLine("hello");
            //Console.WriteLine(args.Length);

            if (args.Length >= 1)
            {
                //byte[] byteIP = System.Text.Encoding.ASCII.GetBytes(args[0]);
                String[] IPsplit = args[0].Split(new char[] { '.' });
                Console.WriteLine("Hi there");

                IPAddress ipAddress = UtilityMethod.convertStrToIP(args[0]);

                UtilityMethod.SetLocalHostIP(ipAddress);
                Console.Write("received port=");
                Console.WriteLine(args[1]);
                UtilityMethod.SetPort(args[1]);

                transportLayerCommunicator = TransportLayerCommunicator.getRefTransportLayerCommunicator();

                //FileAppender fileAppender = new FileAppender();
                //	fileAppender.File = "E:/manga";
                //BasicConfigurator.Configure(fileAppender);
                //log.Info("hi");
                //string fn = @"e:\ratul\code\tashjik\logs\" + args[0]+ ".txt";
                //TextWriter errStream = new StreamWriter(fn);
                //Console.SetError(errStream);
                //Console.SetOut(errStream);
            }
예제 #2
0
        public static void Main()
        {
            TransportLayerCommunicator transportLayerCommunicator = TransportLayerCommunicator.getRefTransportLayerCommunicator();

            while (true)
            {
            }
        }
예제 #3
0
        static TransportLayerCommunicator transportLayerCommunicator;         // = TransportLayerCommunicator.getRefTransportLayerCommunicator();

#if SIM
        public static void Main(string[] args)
        {
            Console.WriteLine("hello");
            //Console.WriteLine(args.Length);

            if (args.Length >= 1)
            {
                //byte[] byteIP = System.Text.Encoding.ASCII.GetBytes(args[0]);
                String[] IPsplit = args[0].Split(new char[] { '.' });
                Console.WriteLine("Hi there");

                IPAddress ipAddress = UtilityMethod.convertStrToIP(args[0]);

                UtilityMethod.SetLocalHostIP(ipAddress);
                Console.Write("received port=");
                Console.WriteLine(args[1]);
                UtilityMethod.SetPort(args[1]);

                transportLayerCommunicator = TransportLayerCommunicator.getRefTransportLayerCommunicator();
            }