How to write a windows service in C # that listens for tcp connections and processes these connections? The problem is that I want better than "blocking" in the main thread, for example.
while (true);
I can start the listener in another thread, but the main thread needs to be blocked so that the application cannot exit (and the service stops working). Thanks.
yuben source
share