botframework-streaming
Version:
Streaming library for the Microsoft Bot Framework
41 lines • 1.88 kB
TypeScript
import { RequestHandler } from '../requestHandler';
import { StreamingRequest } from '../streamingRequest';
import { IStreamingTransportClient, IReceiveResponse } from '../interfaces';
/**
* Streaming transport client implementation that uses named pipes for inter-process communication.
*/
export declare class NamedPipeClient implements IStreamingTransportClient {
private readonly _baseName;
private readonly _requestHandler;
private readonly _sender;
private readonly _receiver;
private readonly _requestManager;
private readonly _protocolAdapter;
private readonly _autoReconnect;
private _isDisconnecting;
/**
* Creates a new instance of the [NamedPipeClient](xref:botframework-streaming.NamedPipeClient) class.
*
* @param baseName The named pipe to connect to.
* @param requestHandler Optional [RequestHandler](xref:botframework-streaming.RequestHandler) to process incoming messages received by this client.
* @param autoReconnect Optional setting to determine if the client sould attempt to reconnect automatically on disconnection events. Defaults to true.
*/
constructor(baseName: string, requestHandler?: RequestHandler, autoReconnect?: boolean);
/**
* Establish a connection with no custom headers.
*/
connect(): Promise<void>;
/**
* Disconnect the client.
*/
disconnect(): void;
/**
* Task used to send data over this client connection.
*
* @param request The [StreamingRequest](xref:botframework-streaming.StreamingRequest) to send.
* @returns A promise for an instance of [IReceiveResponse](xref:botframework-streaming.IReceiveResponse) on completion of the send operation.
*/
send(request: StreamingRequest): Promise<IReceiveResponse>;
private onConnectionDisconnected;
}
//# sourceMappingURL=namedPipeClient.d.ts.map