src/vs/platform/remote/browser/browserSocketFactory.ts/BrowserSocketFactory/connect
class BrowserSocketFactory:	connect(host: string, port: number, path: string, query: string, debugLabel: string, callback: IConnectCallback): void {
		const webSocketSchema = (/^https:/.test(window.location.href) ? 'wss' : 'ws');
		const socket = this._webSocketFactory.create(`${webSocketSchema}://${/:/.test(host) ? `[${host}]` : host}:${port}${path}?${query}&skipWebSocketFrames=false`, debugLabel);
		const errorListener = socket.onError((err) => callback(err, undefined));
		socket.onOpen(() => {
			errorListener.dispose();
			callback(undefined, new BrowserSocket(socket, debugLabel));
		});
	}