(http: string)
| 114 | } |
| 115 | |
| 116 | function wsUrl(http: string): string { |
| 117 | return http.replace(/^http:\/\//, 'ws://') + '/api/v1/ws'; |
| 118 | } |
| 119 | |
| 120 | function openConn(url: string, opts?: ConnectOptions): Promise<Conn> { |
| 121 | return new Promise((resolve, reject) => { |