DcOption

class pyrogram.raw.types.DcOption

Data center

Constructor of DcOption.

Details:
  • Layer: 223

  • ID: 18B7A10D

Parameters:
  • id (int 32-bit) – DC ID

  • ip_address (str) – IP address of DC

  • port (int 32-bit) – Port

  • ipv6 (bool, optional) – Whether the specified IP is an IPv6 address

  • media_only (bool, optional) – Whether this DC should only be used to download or upload files

  • tcpo_only (bool, optional) – Whether this DC only supports connection with transport obfuscation

  • cdn (bool, optional) – Whether this is a CDN DC.

  • static (bool, optional) – If set, this IP should be used when connecting through a proxy

  • this_port_only (bool, optional) – If set, clients must connect using only the specified port, without trying any other port.

  • secret (bytes, optional) – If the tcpo_only flag is set, specifies the secret to use when connecting using transport obfuscation

TL Schema

dcOption#18b7a10d
flags:#
ipv6:flags.0?true
media_only:flags.1?true
tcpo_only:flags.2?true
cdn:flags.3?true
static:flags.4?true
this_port_only:flags.5?true
id:int
ip_address:string
port:int
secret:flags.10?bytes

= DcOption

Parameter Tree

DcOption
├── ipv6true (optional)
├── media_onlytrue (optional)
├── tcpo_onlytrue (optional)
├── cdntrue (optional)
├── statictrue (optional)
├── this_port_onlytrue (optional)
├── idint
├── ip_addressstring
├── portint
└── secretbytes (optional)

Example

DcOption(
    id=0,
    ip_address="text",
    port=0,
)