@microsoft/signalr
Version:
ASP.NET Core SignalR Client
20 lines (14 loc) • 632 B
text/typescript
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
import { TransferFormat } from "./ITransport";
/** @private */
export interface IConnection {
readonly features: any;
readonly connectionId?: string;
baseUrl: string;
start(transferFormat: TransferFormat): Promise<void>;
send(data: string | ArrayBuffer): Promise<void>;
stop(error?: Error): Promise<void>;
onreceive: ((data: string | ArrayBuffer) => void) | null;
onclose: ((error?: Error) => void) | null;
}