A connection to a single DC.

Hierarchy

  • PersistentConnection
    • SessionConnection

Constructors

Properties

_destroyed: boolean = false
_disconnectedManually: boolean = false
_inactive: boolean = true
_mtproxyInfo?: RawInputClientProxy
_session: MtprotoSession
_usable: boolean = false
log: Logger
onAuthBegin: Emitter<void> = ...
onDisconnect: Emitter<void> = ...
onError: Emitter<Error> = ...
onFloodDone: Emitter<void> = ...
onFutureSalts: Emitter<RawMt_future_salt[]> = ...
onKeyChange: Emitter<null | Uint8Array> = ...
onRequestAuth: Emitter<void> = ...
onTmpKeyChange: Emitter<null | [Uint8Array, number]> = ...
onUpdate: Emitter<TypeUpdates> = ...
onUsable: Emitter<void> = ...
onWait: Emitter<number> = ...

Accessors

  • get isConnected(): boolean
  • Returns boolean

Methods

  • Returns void

  • Returns void

  • Returns void

  • Returns void

  • Parameters

    Returns Promise<void>

  • Returns void

  • Returns Promise<void>

  • Returns Promise<void>

  • Returns void

  • Parameters

    • temp: boolean = false

    Returns null | Uint8Array

  • Parameters

    • error: Error

    Returns void

  • Parameters

    • online: boolean

    Returns void

  • Returns void

  • Returns void

  • Returns void

  • Parameters

    • data: Uint8Array

    Returns void

  • Returns void

  • Parameters

    • forever: boolean = false

    Returns void

  • Parameters

    • data: Uint8Array

    Returns Promise<void>

  • Type Parameters

    • T extends RpcMethod

    Parameters

    • request: T
    • Optionaltimeout: number
    • OptionalabortSignal: AbortSignal
    • OptionalchainId: string | number

    Returns Promise<RpcCallReturn[T["_"]]>

  • Parameters

    • Optionaltimeout: number

    Returns void

  • Parameters

    • usePfs: boolean

    Returns void

  • Parameters

    • timeout: number = 5000

    Returns Promise<Uint8Array>