UNPKG

@litert/televoke

Version:
52 lines 2.32 kB
/** * Copyright 2025 Angus.Fenying <fenying@litert.org> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import * as Shared from './Shared.decl'; export declare class TvBinaryStreamManager implements Shared.IStreamManager { defaultTimeout: number; maxStreams: number; private _closed; private readonly _streams; constructor(defaultTimeout: number, maxStreams: number); private _generateStreamId; close(): void; get(id: number): Shared.IBinaryReadStream | null; create(): Shared.IBinaryReadStream; } /** * Create a factory function to create a `IStreamManager` instance, associated to a single channel. * When the associated channel is closed, all streams insides the stream manager will be aborted. * * @param defaultTimeout The default timeout value of each new binary stream. * @returns The factory function. */ export declare function createChannelStreamManagerFactory(defaultTimeout?: number, maxStreams?: number): Shared.IStreamManagerFactory; /** * Create a factory function to create a `IStreamManager` instance, shared between all channels. * So that the streams created could be used in different channels. * * @param defaultTimeout The default timeout value of each new binary stream. * @returns The factory function. */ export declare function createSharedStreamManagerFactory(defaultTimeout?: number, maxStreams?: number): Shared.IStreamManagerFactory; /** * Create a factory function to create a `IStreamManager` instance, disabling all binary streams. * * > This is useful when you don't need binary streams. * * @returns The factory function. */ export declare function createDisabledStreamManagerFactory(): Shared.IStreamManagerFactory; //# sourceMappingURL=BinaryStreamManager.d.ts.map