Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Type aliases

ConnectionOptionsType

ConnectionOptionsType: { connectTimeout?: number; encoding?: BufferEncoding; keepAlive?: { enable: boolean; initialDelay?: number }; noDelay?: boolean; queueOptions?: QueueConstructorType; tcpConstructorOptions?: SocketConstructorOpts; timeout?: number }

Type declaration

  • Optional connectTimeout?: number

    连接超时

  • Optional encoding?: BufferEncoding

    设置数据编码,也可以在write中设置

  • Optional keepAlive?: { enable: boolean; initialDelay?: number }

    是否开启KeepAlive功能

    • enable: boolean
    • Optional initialDelay?: number
  • Optional noDelay?: boolean

    是否开启拥塞控制算法

  • Optional queueOptions?: QueueConstructorType

    队列参数,可以设置 队列 发送的 间隔 或者 数量

  • Optional tcpConstructorOptions?: SocketConstructorOpts

    创建TCP socket时,传给构造函数的参数

  • Optional timeout?: number

    设置inactive超时时长

RegisterOptionType

RegisterOptionType<T>: { connectionOptions: ConnectionOptionsType; discoverDeviceType?: DiscoverDeviceType; discoverOptions?: T }

register 函数参数 options 的类型

Type parameters

  • T

Type declaration

TCPDeviceAddressType

TCPDeviceAddressType: { address?: string; buffer: Buffer; port?: number }

搜索设备时,设备对象中包含的data数据,会在connection时使用

Type declaration

  • Optional address?: string
  • buffer: Buffer
  • Optional port?: number

Variables

AutoTCPDeviceType

AutoTCPDeviceType: AutoConnectDeviceType = ...

Functions

getTCPDeviceRegister

Generated using TypeDoc