示例#1
0
        static async Task <int> Main(string[] args)
        {
            //var i = BitConverter.GetBytes('i');
            //var l = BitConverter.GetBytes('l');
            //var s = BitConverter.GetBytes('s');
            //var o = 5;
            //var k = 6;
            //if (o == 5)
            //{
            //    Console.WriteLine(5);
            //}
            //else if (k == 6)
            //{
            //    Console.WriteLine(6);
            //}
            //else
            //{
            //    Console.WriteLine(0);
            //}
            //char k = '3';
            //var l = BitConverter.GetBytes(true);
            //var l23 = BitConverter.GetBytes(false);
            //var l2 = BitConverter.GetBytes(k);
            //byte[] l3 = new byte[3];
            //Array.Copy(l2, 0, l3, 0, l2.Length);
            //l3[2] = l[0];
            ////byte[] l3 = new byte[3] { l[0], l2[0], l2[1] };

            //var kljl = BitConverter.ToBoolean(l3, 0);


            var mainDirectoryPath = @"D:\temp\messenger";

            ProjectPaths.MainDirectoryPath = mainDirectoryPath;
            Server server = new Server(mainDirectoryPath);
            await server.Run(5);

            return(1);
        }
示例#2
0
 public static void Main(string[] args)
 {
     Server svr = new Server();
     svr.Run();
 }
 private void StartServer()
 {
     server.Connect = true;
     server.Run();
 }