"use strict";
//
//  Copyright (c) Microsoft Corporation. All rights reserved.
//
Object.defineProperty(exports, "__esModule", { value: true });
exports.ForwardedPortConnectingEventArgs = exports.ForwardedPortChannelEventArgs = exports.ForwardedPortEventArgs = void 0;
class ForwardedPortEventArgs {
    constructor(port) {
        this.port = port;
    }
    toString() {
        return this.port.toString();
    }
}
exports.ForwardedPortEventArgs = ForwardedPortEventArgs;
class ForwardedPortChannelEventArgs extends ForwardedPortEventArgs {
    constructor(port, channel) {
        super(port);
        this.port = port;
        this.channel = channel;
    }
    toString() {
        return `${this.port} ${this.channel}`;
    }
}
exports.ForwardedPortChannelEventArgs = ForwardedPortChannelEventArgs;
/**
 * Event raised when an incoming or outgoing connection to a forwarded port is
 * about to be established.
 */
class ForwardedPortConnectingEventArgs {
    constructor(
    /**
     * The remote forwarded port number. This may be different from the local port number,
     * if the local TCP listener chose a different port.
     */
    port, 
    /**
     * True if this connection is incoming (remote connection to a local port);
     * false if it is outgoing (local connection to a remote port).
     */
    isIncoming, 
    /**
     * A stream for the forwarded connection.
     */
    stream, 
    /**
     * A cancellation token that is cancelled when the session is closed.
     */
    cancellation) {
        this.port = port;
        this.isIncoming = isIncoming;
        this.stream = stream;
        this.cancellation = cancellation;
    }
    toString() {
        return `${this.port} isIncoming=${this.isIncoming}`;
    }
}
exports.ForwardedPortConnectingEventArgs = ForwardedPortConnectingEventArgs;
//# sourceMappingURL=https://github.com/VSCodium/sourcemaps/releases/download/stable-824c4c46a288b839f13b24022655329c2aeb9f81/node_modules-@microsoft-dev-tunnels-ssh-tcp-events-forwardedPortEventArgs.js.map