/*set up the server*/
 private InfoServer()
 {
     serverThread = null;
     commands     = new DataQueue();
     //subscribe to the queue event with the class notification event
     commands.PropertyChanged += Vm_PropertyChanged;
     server = new PrivateServer(commands);
 }
Exemple #2
0
        public void connect(string ip, int port)
        {
            if (serverThread != null)
            {
                serverThread.Interrupt();
            }
            PrivateServer server = new PrivateServer(ip, port, commands);

            serverThread = new Thread(new ThreadStart(server.getCommands));
            serverThread.IsBackground = true;
            serverThread.Start();
        }