MTP¶
class MTP¶
class MTP(BaseObject)
MTProto Protocal
This class is for further future developments and has no usage for now.
Attributes:
Name | Type | Description |
---|---|---|
Environment | class | MTP Enviroment |
RSAPublicKey | class | RSAPublicKey |
DcOptions | class | DcOptions |
ConfigFields | class | ConfigFields |
Config | class | Config |
class Environment¶
class Environment(IntEnum)
Enviroment flag for MTP.Config
Attributes:
Name | Type | Description |
---|---|---|
Production | IntEnum | Production Enviroment |
Test | IntEnum | Test Enviroment |
class RSAPublicKey¶
class RSAPublicKey(BaseObject)
To be added
class DcOptions¶
class DcOptions(BaseObject)
Data Center Options, providing information about DC ip, port,.. etc
class Address¶
class Address(int)
Connection flag used for MTP.DcOptions.Endpoint
Attributes:
Name | Type | Description |
---|---|---|
IPv4 | int | IPv4 connection |
IPv6 | int | IPv6 connection |
class Protocol¶
class Protocol(int)
Protocal flag used for MTP.DcOptions.Endpoint
Attributes:
Name | Type | Description |
---|---|---|
Tcp | int | Tcp connection |
Http | int | Http connection |
class Flag¶
class Flag(int)
Flag used for MTP.DcOptions.Endpoint
Attributes:
Name | Type | Description |
---|---|---|
f_ipv6 | int | f_ipv6 |
f_media_only | int | f_media_only |
f_tcpo_only | int | f_tcpo_only |
f_cdn | int | f_cdn |
f_static | int | f_static |
f_secret | int | f_secret |
MAX_FIELD | int | MAX_FIELD |
class Endpoint¶
class Endpoint(BaseObject)
Data center endpoint
Attributes:
Name | Type | Description |
---|---|---|
id | DcId | Data Center ID |
flags | Flag | Flag |
ip | str | IP address of the data center |
port | int | Port to connect to |
secret | bytes | secret |
class ConfigFields¶
class ConfigFields(BaseObject)
Configuration data for MTP.Config
Attributes:
Name | Type | Description |
---|---|---|
chatSizeMax | int | 200 |
megagroupSizeMax | int | 10000 |
forwardedCountMax | int | 100 |
onlineUpdatePeriod | int | 120000 |
offlineBlurTimeout | int | 5000 |
offlineIdleTimeout | int | 30000 |
onlineFocusTimeout | int | 1000 # Not from the server config. |
onlineCloudTimeout | int | 300000 |
notifyCloudDelay | int | 30000 |
notifyDefaultDelay | int | 1500 |
savedGifsLimit | int | 200 |
editTimeLimit | int | 172800 |
revokeTimeLimit | int | 172800 |
revokePrivateTimeLimit | int | 172800 |
revokePrivateInbox | bool | False |
stickersRecentLimit | int | 30 |
stickersFavedLimit | int | 5 |
pinnedDialogsCountMax | int | 5 |
pinnedDialogsInFolderMax | int | 100 |
internalLinksDomain | str | "https://t.me/" |
channelsReadMediaPeriod | int | 86400 * 7 |
callReceiveTimeoutMs | int | 20000 |
callRingTimeoutMs | int | 90000 |
callConnectTimeoutMs | int | 30000 |
callPacketTimeoutMs | int | 10000 |
webFileDcId | int | 4 |
txtDomainString | str | str() |
phoneCallsEnabled | bool | True |
blockedMode | bool | False |
captionLengthMax | int | 1024 |
class Config¶
class Config(BaseObject)
Configuration of MTProto
Attributes:
Name | Type | Description |
---|---|---|
kVersion | int | 1 |