Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            VncServer s = new VncServer("1", 5900, "TestServer");

            try
            {
                s.Start();
            }
            catch (ArgumentNullException ex)
            {
                Console.WriteLine(ex.Message);
                return;
            }
            Console.ReadLine();
        }
Ejemplo n.º 2
0
        private static void Main(string[] args)
        {
            var s = new VncServer("", "a", 5901, 5900, "Ulterius VNC");

            try
            {
                s.Start();
                Console.Read();
                s.Stop();
            }
            catch (ArgumentNullException ex)
            {
                s.Stop();
                return;
            }
        }
Ejemplo n.º 3
0
        private static void Main(string[] args)
        {
            var    s   = new VncServer("", "password", 5901, 5900, "VNC Client");
            Thread thr = new Thread(new ThreadStart(startTunnel));

            try
            {
                thr.Start();
                s.Start();
                Console.Read();
                s.Stop();
            }
            catch (ArgumentNullException ex)
            {
                s.Stop();
                return;
            }
        }
Ejemplo n.º 4
0
 public void StartVncServer()
 {
     try
     {
         var settings     = new Settings();
         var vncProxyPort = settings.Read("Vnc", "VncProxyPort", 5901);
         var vncPort      = settings.Read("Vnc", "VncPort", 5900);
         var vncPass      = settings.Read("Vnc", "VncPass", "");
         vncServer = new VncServer(vncPass, vncProxyPort, vncPort, "Ulterius VNC");
         Task.Run(() => { vncServer.Start(); });
         var endData = new
         {
             vncStarted = true,
             proxyPort  = vncProxyPort,
             port       = vncPort,
             message    = "VNC Server Started"
         };
         serializator.Serialize(_client, packet.endpoint, packet.syncKey, endData);
     }
     catch (ArgumentNullException)
     {
         vncServer?.Stop();
     }
 }