/** * Copyright 2024 Angus.Fenying * * 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 C from '../Common'; import { AbstractProtocolClient } from './AbstractProtocolClient'; import * as $H2 from 'http2'; import * as A from './Abstract'; interface IConnection { concurrency: number; connection: $H2.ClientHttp2Session; } export declare abstract class AbstractHttp2Client extends AbstractProtocolClient { protected _: A.IHelper; private _connections; private _connIndex; constructor(_: A.IHelper); close(): void; /** * Preprocess the headers of request, make all the header-names lowercase, and replace * H2 headers into H1 headers. */ protected _preprocessHeaders(headers: C.TRequestHeaders): C.TRequestHeaders; abstract getAuthorityKey(opts: C.IRequestOptions): string; protected _getConnection(opts: C.IRequestOptions, h2Opts: $H2.ClientSessionOptions | $H2.SecureClientSessionOptions, key: string): Promise<[string, IConnection]>; private _releaseConnection; protected abstract _prepareOptions(opts: C.IRequestOptions): $H2.SecureClientSessionOptions | $H2.ClientSessionOptions; protected _processRequest(opts: C.IRequestOptions, key?: string): Promise; } export {}; //# sourceMappingURL=AbstractHttp2Client.d.ts.map