Esempio n. 1
0
        static void Main1()
        {
            IFileServer iFileServer = (IFileServer)Activator.GetObject(typeof(IFileServer), "tcp://localhost:1244/MyFileServer");

            Byte[] arrData = iFileServer.getFile("Test.txt");
            Console.WriteLine("Received " + arrData.Length + "bytes from server");
        }
Esempio n. 2
0
        static void Main()
        {
            IFileServer iFileServer = (IFileServer)Activator.GetObject(typeof(IFileServer),
                                                                       "tcp://127.0.0.1:6010/MyFileServer");

            Console.WriteLine(iFileServer.getTime());

            Byte[] arrData = iFileServer.getFile("Del.txt");
            Console.WriteLine("Received " + arrData.Length + "bytes from server");
            //     FileStream fs = File.Create("D:/Object/delete/temp2/Winter.jpg");
            //    fs.Write(arrData, 0, arrData.Length);
            //    fs.Close();
        }