/// <reference types="node" />
import { CancellationToken, SshChannel, SshStream } from '@microsoft/dev-tunnels-ssh';
import { Duplex } from 'stream';
import { ForwardedPort } from './forwardedPort';
export declare class ForwardedPortEventArgs {
    readonly port: ForwardedPort;
    constructor(port: ForwardedPort);
    toString(): string;
}
export declare class ForwardedPortChannelEventArgs extends ForwardedPortEventArgs {
    port: ForwardedPort;
    readonly channel: SshChannel;
    constructor(port: ForwardedPort, channel: SshChannel);
    toString(): string;
}
/**
 * Event raised when an incoming or outgoing connection to a forwarded port is
 * about to be established.
 */
export declare class ForwardedPortConnectingEventArgs {
    /**
     * The remote forwarded port number. This may be different from the local port number,
     * if the local TCP listener chose a different port.
     */
    readonly port: number;
    /**
     * True if this connection is incoming (remote connection to a local port);
     * false if it is outgoing (local connection to a remote port).
     */
    readonly isIncoming: boolean;
    /**
     * A stream for the forwarded connection.
     */
    readonly stream: SshStream;
    /**
     * A cancellation token that is cancelled when the session is closed.
     */
    readonly cancellation?: CancellationToken | undefined;
    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: number, 
    /**
     * True if this connection is incoming (remote connection to a local port);
     * false if it is outgoing (local connection to a remote port).
     */
    isIncoming: boolean, 
    /**
     * A stream for the forwarded connection.
     */
    stream: SshStream, 
    /**
     * A cancellation token that is cancelled when the session is closed.
     */
    cancellation?: CancellationToken | undefined);
    /**
     * Gets or sets an optional promise that resolves to a transformed stream.
     * An event-handler may apply a transformation to the stream before the stream is connected
     * to the local port or returned to the application. If the promise result is null, the
     * connection is rejected.
     */
    transformPromise?: Promise<Duplex | null>;
    toString(): string;
}
//# sourceMappingURL=forwardedPortEventArgs.d.ts.map