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; }
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(); }
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; } }