import { network } from "https://deno.land/x/grm@0.6.0/mod.ts";
const { MTProtoSender } = network;
Constructors
new
MTProtoSender(authKey: undefined | AuthKey, opts: DEFAULT_OPTIONS)Properties
private
_connectMutex: Mutexprivate
readonly
_log: Loggerprivate
_pendingState: Map<string, RequestState>private
_recvCancelPromise: Promise<CancelHelper>private
optional
_recvCancelResolve: (value: CancelHelper) => voidprivate
_sendCancelPromise: Promise<CancelHelper>private
optional
_sendCancelResolve: (value: CancelHelper) => voidprivate
_sendQueue: MessagePackerprivate
readonly
_state: MTProtoStateprivate
readonly
_updateCallback: (client: any, update: UpdateConnectionState) => voidoptional
_connection: Connectionreadonly
authKey: AuthKeyMethods
private
_startReconnecting(error: Error)_connect()
_disconnect(error?: 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)
_reconnect(lastError?: any)
_tryConnect(attempt: number)
_tryGenAuthKey(attempt: number)
connect(connection: Connection): Promise<boolean>
send(request: Api.AnyRequest): any