private void ListeningThread() // let's listen in another thread instead!! { int port = 12345; // change as required this.listener = new TcpListener(IPAddress.Any, port); try { this.listener.Start(); } catch (Exception e) { MessageBox.Show("couldn't bind to port " + port + " -> " + e.Message); return; } while (true) { Thread.Sleep(30); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)