UNPKG

632 BPlain TextView Raw
1// Copyright (c) .NET Foundation. All rights reserved.
2// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3
4import { TransferFormat } from "./ITransport";
5
6/** @private */
7export interface IConnection {
8 readonly features: any;
9 readonly connectionId?: string;
10
11 baseUrl: string;
12
13 start(transferFormat: TransferFormat): Promise<void>;
14 send(data: string | ArrayBuffer): Promise<void>;
15 stop(error?: Error): Promise<void>;
16
17 onreceive: ((data: string | ArrayBuffer) => void) | null;
18 onclose: ((error?: Error) => void) | null;
19}
20
\No newline at end of file