"use strict";
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
Object.defineProperty(exports, "__esModule", { value: true });
exports.PortRelayConnectResponseMessage = void 0;
const dev_tunnels_ssh_1 = require("@microsoft/dev-tunnels-ssh");
/**
 * Extends port-forward channel open confirmation messages to include additional properties
 * required by the tunnel relay.
 */
class PortRelayConnectResponseMessage extends dev_tunnels_ssh_1.ChannelOpenConfirmationMessage {
    constructor() {
        super(...arguments);
        /**
         * Gets or sets a value indicating whether end-to-end encryption is enabled for the
         * connection.
         * The tunnel client may request E2E encryption via `isE2EEncryptionRequested`. Then relay
         * or host may enable E2E encryption or not depending on capabilities and policies, and the
         * resulting enabled status is returned to the client via this property.
         */
        this.isE2EEncryptionEnabled = false;
    }
    onWrite(writer) {
        super.onWrite(writer);
        writer.writeBoolean(this.isE2EEncryptionEnabled);
    }
    onRead(reader) {
        super.onRead(reader);
        this.isE2EEncryptionEnabled = reader.readBoolean();
    }
}
exports.PortRelayConnectResponseMessage = PortRelayConnectResponseMessage;
//# sourceMappingURL=https://github.com/VSCodium/sourcemaps/releases/download/stable-824c4c46a288b839f13b24022655329c2aeb9f81/node_modules-@microsoft-dev-tunnels-connections-messages-portRelayConnectResponseMessage.js.map