(e: Entry)
| 42 | const servers = new Map<string, Entry>(); |
| 43 | |
| 44 | function infoFor(e: Entry): LiveInfo { |
| 45 | return { |
| 46 | id: e.handle.id, |
| 47 | url: e.handle.url, |
| 48 | port: e.handle.port, |
| 49 | token: e.handle.token, |
| 50 | uptimeMs: Date.now() - e.handle.startedAt, |
| 51 | clientCount: e.handle.clientCount(), |
| 52 | urls: e.urls, |
| 53 | tunnelUrl: e.tunnelUrl, |
| 54 | tunnelError: e.tunnelError, |
| 55 | }; |
| 56 | } |
| 57 | |
| 58 | async function closeEntry(e: Entry): Promise<void> { |
| 59 | try { e.tunnel?.close(); } catch { /* tunnel already gone */ } |