public Network(string ipAdress, int port)
 {
     networkCommunication = new NetworkCommunication(ipAdress, port, this);
     if (networkCommunication.ConnectToServer())
         status = "Connected";
     else
         status = "Can't connect to: " + ipAdress + ":" + port;
 }
Exemple #2
0
 public Networkconnect(string ipAdress, int port)
 {
     this.ipAdress = ipAdress;
     this.port = port;
     networkCommunication = new NetworkCommunication(ipAdress, port, this);
     Thread connectionThread = new Thread(new ThreadStart(TryConnecting));
     connectionThread.IsBackground = true;
     connectionThread.Start();
 }
Exemple #3
0
        public Networkconnect(string ipAdress, int port)
        {
            this.ipAdress        = ipAdress;
            this.port            = port;
            networkCommunication = new NetworkCommunication(ipAdress, port, this);
            Thread connectionThread = new Thread(new ThreadStart(TryConnecting));

            connectionThread.IsBackground = true;
            connectionThread.Start();
        }
Exemple #4
0
 public Network(string ipAdress, int port)
 {
     networkCommunication = new NetworkCommunication(ipAdress, port, this);
     if (networkCommunication.ConnectToServer())
     {
         status = "Connected";
     }
     else
     {
         status = "Can't connect to: " + ipAdress + ":" + port;
     }
 }