(state: ListenerState)
| 138 | } |
| 139 | |
| 140 | function tcpAddress(state: ListenerState) { |
| 141 | return Effect.gen(function* () { |
| 142 | if (state.server.address._tag === "TcpAddress") return state.server.address |
| 143 | yield* Scope.close(state.scope, Exit.void).pipe(Effect.ignore) |
| 144 | return yield* Effect.die(new Error(`Unexpected HttpServer address tag: ${state.server.address._tag}`)) |
| 145 | }) |
| 146 | } |
| 147 | |
| 148 | function makeURL(hostname: string, port: number) { |
| 149 | const result = new URL("http://localhost") |