54 lines
No EOL
2.2 KiB
TypeScript
54 lines
No EOL
2.2 KiB
TypeScript
/**
|
|
* @module botframework-streaming
|
|
*/
|
|
/**
|
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
* Licensed under the MIT License.
|
|
*/
|
|
import { IStreamingTransportServer, IReceiveResponse } from '../interfaces';
|
|
import { RequestHandler } from '../requestHandler';
|
|
import { StreamingRequest } from '../streamingRequest';
|
|
/**
|
|
* Streaming transport server implementation that uses named pipes for inter-process communication.
|
|
*/
|
|
export declare class NamedPipeServer implements IStreamingTransportServer {
|
|
private readonly baseName;
|
|
private _outgoingServer;
|
|
private _incomingServer;
|
|
private readonly _sender;
|
|
private readonly _receiver;
|
|
private readonly _protocolAdapter;
|
|
/**
|
|
* Creates a new instance of the [NamedPipeServer](xref:botframework-streaming.NamedPipeServer) 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 Deprecated: Automatic reconnection is the default behavior.
|
|
*/
|
|
constructor(baseName: string, requestHandler?: RequestHandler, autoReconnect?: boolean);
|
|
/**
|
|
* Get connected status
|
|
*
|
|
* @returns true if currently connected.
|
|
*/
|
|
get isConnected(): boolean;
|
|
/**
|
|
* Used to establish the connection used by this server and begin listening for incoming messages.
|
|
*
|
|
* @param onListen Optional callback that fires once when server is listening on both incoming and outgoing pipe
|
|
* @returns A promised string that will not resolve as long as the server is running.
|
|
*/
|
|
start(onListen?: () => void): Promise<string>;
|
|
/**
|
|
* Allows for manually disconnecting the server.
|
|
*/
|
|
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>;
|
|
}
|
|
//# sourceMappingURL=namedPipeServer.d.ts.map
|