Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ClientSocket

Hierarchy

  • SocketHandler
    • ClientSocket

Index

Constructors

Properties

_expectClosing: boolean = false
_reconnectionTimeout: null | Timer
client: Client

The socket's client

since

0.7.0

name: null | string

The name of this socket.

since

0.0.1

queue: Queue = ...

The incoming message queue for this handler.

since

0.1.0

retriesRemaining: number

How many reconnection attempts this socket has remaining.

since

0.7.0

socket: Socket

The internal socket that connects Veza to the network.

since

0.0.1

status: ClientSocketStatus = ClientSocketStatus.Disconnected

The socket's status

since

0.7.0

Accessors

  • get canReconnect(): boolean

Methods

  • _attemptConnection(...options: [any, any?, any?]): void
  • _connect(...options: [any, any?, any?]): Promise<void>
  • _emitConnect(): void
  • _handleMessage(message: RawMessage): null | Readonly<NodeMessage>
  • _handshake(): Promise<void>
  • _onClose(...options: [any, any?, any?]): void
  • _onConnect(): void
  • _onData(data: Uint8Array): void
  • _onError(error: any): void
  • _reconnect(...options: [any, any?, any?]): void
  • connect(options: SocketConnectOpts, connectionListener?: () => void): Promise<ClientSocket>
  • connect(port: number, host: string, connectionListener?: () => void): Promise<ClientSocket>
  • connect(port: number, connectionListener?: () => void): Promise<ClientSocket>
  • connect(path: string, connectionListener?: () => void): Promise<ClientSocket>
  • disconnect(): boolean
  • send(data: any, options?: SendOptions): Promise<unknown>

Generated using TypeDoc