/**
 * Copyright 2019 Google LLC
 *
 * 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.
 */
/// <reference types="node" />
import Transport from '.';
import { SocketLike } from '../Socket';
import PulseControlMessageProtocol from '../pcmp/PulseControlMessageProtocol';
import TransportControlProtocol from './TransportControlProtocol';
import Event from '../util/event';
import Interface from '../Interface';
export default abstract class BaseTransport implements Transport {
    static readonly displayName: string;
    static readonly ncpProtocolNumber?: number;
    static readonly protocolNumber: number;
    closed: boolean;
    _mtu: number;
    protected opened: Event;
    protected sockets: Record<number, SocketLike>;
    protected ncp?: TransportControlProtocol;
    protected pcmp?: PulseControlMessageProtocol;
    constructor(intf: Interface);
    get mtu(): number;
    thisLayerUp(): void;
    thisLayerDown(): void;
    openSocket(port: number, timeout: number): Promise<SocketLike>;
    unregisterSocket(port: number): void;
    send(port: number, information: Buffer): void;
    down(): void;
    protected closeAllSockets(): void;
    protected onPortClosed(port: number): void;
}
