UNPKG

@ntrip/caster

Version:
41 lines (40 loc) 1.21 kB
/// <reference types="node" /> import tls = require('tls'); import { CasterTransportDefinition, CasterTransportInterface } from '../../caster'; import { Transport } from '../transport'; export interface SourceHost { hostMask: string; port?: number; authenticate?: boolean; type: 'server' | 'client'; mountpoint: string; gga?: string; str?: string; } export interface SocketTransportOptions { port: number; tls?: tls.SecureContextOptions & tls.TlsOptions; sourceHosts: SourceHost[]; } export interface SocketTransportConnectionProperties { protocol: 'tcp' | 'tls'; remote: { host: string; port: number; family: string; }; toString: () => string; } export declare class SocketTransport extends Transport { private readonly options; private server; protected constructor(manager: CasterTransportInterface, options: SocketTransportOptions); static new(options: SocketTransportOptions): CasterTransportDefinition; open(): void; close(): void; private static matchHost; private findMatchingSourceHost; private accept; get description(): string; connectionDescription(source: any): string; }