AbstractAbstractauthSets the AuthKey to be used for the saved data center.
AbstractdcReturns the currently-used data center ID.
AbstractportReturns the port to which the library should connect to.
AbstractserverReturns the server address where the library should connect to.
AbstractcloseCalled on client disconnection. Should be used to free any used resources. Can be left empty if none.
AbstractdeleteCalled upon client.logOut(). Should delete the stored information from disk since it's not valid anymore.
Abstractgetgets auth key for a dc
OptionaldcId: numberAbstractgetTurns the given key into an InputPeer (e.g. InputPeerUser).
The library uses this method whenever an InputPeer is needed
to suit several purposes (e.g. user only provided its ID or wishes
to use a cached username to avoid extra RPC).
AbstractloadCalled before using the session
AbstractprocessProcesses the input TLObject or list and saves
whatever information is relevant (e.g., ID or access hash).
May be asynchronous; the library awaits the result where possible,
and a storage failure never fails the request that produced it.
Abstractsavecalled whenever important properties change. It should make persist the relevant session information to disk.
Abstractsetsets auth key for a dc
OptionalauthKey: AuthKeyOptionaldcId: numberAbstractsetSets the information of the data center address and port that the library should connect to, as well as the data center ID, which is currently unused.
{number}
{string}
{number}
Returns an
AuthKeyinstance associated with the saved data center, orundefinedif a new one should be generated.