@microsoft/dev-tunnels-ssh
Version:
SSH library for Dev Tunnels
36 lines • 1.7 kB
TypeScript
import { SshChannel } from '../sshChannel';
import { ChannelMessage, ChannelOpenMessage, SshChannelOpenFailureReason } from '../messages/connectionMessages';
import { CancellationToken } from 'vscode-jsonrpc';
export declare class SshChannelOpeningEventArgs {
readonly request: ChannelOpenMessage;
readonly channel: SshChannel;
readonly isRemoteRequest: boolean;
constructor(request: ChannelOpenMessage, channel: SshChannel, isRemoteRequest: boolean, cancellation?: CancellationToken);
/**
* Specifies a reason that the channel could not be opened.
*
* The handler of this event can optionally block the channel by setting
* a failure reason. If the event is not handled or the reason remains
* `none` then the channel is allowed to open.
*/
failureReason: SshChannelOpenFailureReason;
/**
* Optional message to go along with a failure reason.
*/
failureDescription: string | null;
/**
* Gets or sets an optional promise that blocks opening the channel until the promise is
* resolved. An event-handler may assign a promise to this property to handle the channel
* opening as an asynchronous operation. The promise must resolve to an instance of
* `ChannelOpenConfirmationMessage`, `ChannelOpenFailureMessage`, or a subclass of one of those.
*/
openingPromise?: Promise<ChannelMessage>;
/**
* Gets a token that is cancelled if the session ends before the request handler
* completes.
*/
get cancellation(): CancellationToken;
private cancellationValue;
toString(): string;
}
//# sourceMappingURL=sshChannelOpeningEventArgs.d.ts.map