* Expects a server and a disposal that cleans up the server (and anything * else that may need cleanup). * * Otherwise a new server is created.
(server?: { server: http.Server; dispose: Disposable["dispose"] })
| 21 | * Otherwise a new server is created. |
| 22 | */ |
| 23 | public constructor(server?: { server: http.Server; dispose: Disposable["dispose"] }) { |
| 24 | this.hs = server?.server || http.createServer() |
| 25 | this.dispose = server?.dispose || disposer(this.hs) |
| 26 | } |
| 27 | |
| 28 | /** |
| 29 | * listen starts the server on a random localhost port. |
nothing calls this directly
no test coverage detected