Beispiel #1
0
        public void Start()
        {
            BinaryWriter writer = new BinaryWriter(this.stream);

            while (true)
            {
                try
                {
                    Bitmap screenshot = TakeScreenshot();

                    byte[] buffer          = Compression.DeflateCompress(Compression.ResizeConvertBMP(screenshot, 80));
                    byte[] protectedBuffer = buffer;//Cipher.Encrypt(buffer, info.Password);

                    writer.Write(buffer.Length);
                    writer.Write(buffer);

                    Thread.Sleep(50);
                } catch (IOException)
                {
                    break;
                }
            }

            Console.WriteLine("Current session aborted.");
            Server.active = false;
            Thread.Sleep(2500);
            Waitroom.BeginConnectionOrListening(info);
        }
Beispiel #2
0
 static void Main(string[] args)
 {
     try
     {
         Waitroom.BeginConnectionOrListening(ArgumentParser.Parse(args));
     } catch (ArgumentParserException ex)
     {
         Console.WriteLine($"error: {ex.Message}");
     }
 }