An example of a stoppable TCP listener in Go