These two functions are just copies of the `net/http` implementations except that we grab the `net.Listener`.