Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ClientTCP

Hierarchy

Index

Constructors

constructor

  • new ClientTCP(options: TcpClientOptions["options"]): ClientTCP

Properties

Protected connection

connection: Promise<any>

Protected deserializer

deserializer: ProducerDeserializer

Private Readonly host

host: string

Private isConnected

isConnected: boolean = false

Private Readonly logger

logger: Logger = new Logger(ClientTCP.name)

Private Readonly port

port: number

Protected routingMap

routingMap: Map<string, Function> = new Map<string, Function>()

Protected serializer

serializer: ProducerSerializer

Private socket

socket: JsonSocket

Methods

Protected assignPacketId

bindEvents

close

  • close(): void

connect

  • connect(): Promise<any>

Protected connect$

  • connect$(instance: any, errorEvent?: string, connectEvent?: string): Observable<any>

Protected createObserver

  • createObserver<T>(observer: Observer<T>): (packet: WritePacket) => void

createSocket

Protected dispatchEvent

emit

  • emit<TResult, TInput>(pattern: any, data: TInput): Observable<TResult>

Protected getOptionsProp

  • getOptionsProp<T, K>(obj: T, prop: K, defaultValue?: T[K]): T[K]

handleClose

  • handleClose(): void

handleError

  • handleError(err: any): void

handleResponse

  • handleResponse(buffer: unknown): void

Protected initializeDeserializer

  • initializeDeserializer(options: ClientOptions["options"]): void

Protected initializeSerializer

  • initializeSerializer(options: ClientOptions["options"]): void

Protected normalizePattern

  • normalizePattern(pattern: MsPattern): string

Protected publish

send

  • send<TResult, TInput>(pattern: any, data: TInput): Observable<TResult>

Generated using TypeDoc