public void StartServer() { this.tcp = new TcpServerModel(txtIP.Text, int.Parse(txtPort.Text)); btnStart.Enabled = false; btnStop.Enabled = true; tcp.Listen(); }
private void btnStart_Click(object sender, EventArgs e) { this.tcp = new TcpServerModel(txtIP.Text, int.Parse(txtPort.Text)); this.tcp.Listen(); btnStart.Enabled = false; btnStop.Enabled = true; Thread t = new Thread(this.ServeMultiClient); t.Start(); }