src/vs/workbench/services/extensions/common/extensionHostEnv.ts/readExtHostConnection
export function readExtHostConnection(env: IProcessEnvironment): ExtHostConnection {
	if (env[IPCExtHostConnection.ENV_KEY]) {
		return cleanAndReturn(env, new IPCExtHostConnection(env[IPCExtHostConnection.ENV_KEY]!));
	}
	if (env[SocketExtHostConnection.ENV_KEY]) {
		return cleanAndReturn(env, new SocketExtHostConnection());
	}
	if (env[MessagePortExtHostConnection.ENV_KEY]) {
		return cleanAndReturn(env, new MessagePortExtHostConnection());
	}
	throw new Error(`No connection information defined in environment!`);
}