title: Template for C#/.NET 6 TCPListener Windows Service
body: <p>I'm trying to implement a windows service that ist listening on a configured port for connections. I was able to create a listener and also a IHostedService but I don't know how to combine those two. I also wonder if a BackgroundService or anything else would be more suitable for that task?</p>
  <p>This must be something people do all the time so there should be some best practice or even a very simple template?</p>
  <p>I'm really confused by Microsofts documentation regarding services and the different ways to use them for different &quot;purposes&quot;. This should be straight forward in my book but it really isn't.</p>