Skip to main content
Module

x/grm/mod.ts>MTProtoSender

MTProto API Client for Deno 🦕
Go to Latest
class MTProtoSender
Re-export
import { MTProtoSender } from "https://deno.land/x/grm@0.5.0/mod.ts";

Constructors

new
MTProtoSender(authKey: undefined | AuthKey, opts: DEFAULT_OPTIONS)

Properties

private
readonly
_authKeyCallback: any
private
_autoReconnect: boolean
private
readonly
optional
_autoReconnectCallback: any
private
readonly
_client: any
private
_connectTimeout: null
private
_dcId: number
private
readonly
_delay: number
private
readonly
_handlers: any
private
readonly
_isMainSender: boolean
private
readonly
_lastAcks: any[]
private
readonly
_log: Logger
private
readonly
optional
_onConnectionBreak: CallableFunction
private
readonly
_pendingAck: Set<any>
private
_pendingState: Map<string, RequestState>
private
_recvLoopHandle: any
private
readonly
_retries: number
private
_securityChecks: boolean
private
readonly
_senderCallback: any
private
_sendLoopHandle: any
private
_sendQueue: MessagePacker
private
readonly
_state: MTProtoState
private
readonly
_updateCallback: (client: any, update: UpdateConnectionState) => void
_authenticated: boolean
optional
_connection: Connection
_disconnected: boolean
_reconnecting: boolean
_userConnected: boolean
readonly
authKey: AuthKey
dcId: number
isConnecting: boolean
userDisconnected: boolean

Methods

_disconnect(_error?)
_handleAck(message: TLMessage)
_handleBadNotification(message: TLMessage)
_handleBadServerSalt(message: TLMessage)
_handleContainer(message: TLMessage)
_handleDetailedInfo(message: TLMessage)
_handleFutureSalts(message: TLMessage)
_handleGzipPacked(message: TLMessage)
_handleMsgAll(_message: TLMessage)
_handleNewDetailedInfo(message: TLMessage)
_handleNewSessionCreated(message: TLMessage)
_handlePong(message: TLMessage)
_handleRPCResult(message: TLMessage)
_handleStateForgotten(message: TLMessage)
_handleUpdate(message: TLMessage)
_popStates(msgId: bigInt.BigInteger)
_processMessage(message: TLMessage)
connect(connection: Connection, force?: boolean)
send(request: Api.AnyRequest): any

Static Properties

DEFAULT_OPTIONS