UNPKG

@achingbrain/nat-port-mapper

Version:
18 lines (13 loc) 441 B
import { EventEmitter } from 'events' import { PMPGateway } from './gateway.js' import type { Gateway, GlobalMapPortOptions } from '../index.js' export class PMPClient extends EventEmitter { private readonly options: GlobalMapPortOptions constructor (options: GlobalMapPortOptions = {}) { super() this.options = options } getGateway (ipAddress: string): Gateway { return new PMPGateway(ipAddress, this.options) } }