Exemple #1
0
        static void Main(string[] args)
        {
            StrumienClient client2  = new StrumienClient();
            string         filePath = Path.Combine(System.Environment.CurrentDirectory, "klient.jpg");

            Console.WriteLine("Wywoluje getStream()");
            Stream stream2 = client2.getStream("image.jpg");

            ZapiszPlik(stream2, filePath);
            Console.WriteLine("Koniec getStream()");

            Console.WriteLine("Wywoluje getMStream()");
            Stream fs = null;
            long   rozmiar;
            string nnn = "image.jpg";

            nnn      = client2.getMStream(nnn, out rozmiar, out fs);
            filePath = Path.Combine(System.Environment.CurrentDirectory, nnn);
            ZapiszPlik(fs, filePath);
            Console.WriteLine("Koniec getMStream()");

            client2.Close();
            Console.WriteLine();
            Console.WriteLine("Nacisnij <ENTER> aby zakonczyc.");
            Console.ReadLine();
        }
Exemple #2
0
        static void Main(string[] args)
        {
            StrumienClient client2 = new StrumienClient();
            string filePath = Path.Combine(System.Environment.CurrentDirectory,
                "klient.jpg");

            Console.WriteLine("Wywoluje getStream()");
            System.IO.Stream stream2 = client2.GetStream("image.jpg");
            ZapiszPlik(stream2, filePath);

            client2.Close();
            Console.WriteLine();
            Console.WriteLine("Nacisnij <ENTER> aby zakonczyc.");
            Console.ReadLine();
        }