MadelineProtoDocs/old_docs/API_docs_v97/constructors/dcOption.md
2019-12-27 17:48:04 +01:00

1.8 KiB

title description image
dcOption Data centre https://docs.madelineproto.xyz/favicons/android-chrome-256x256.png

Constructor: dcOption

Back to constructors index

Data centre

Attributes:

Name Type Required Description
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
id int Yes DC ID
ip_address string Yes IP address of DC
port int Yes Port
secret bytes Optional If the tcpo_only flag is set, specifies the secret to use when connecting using transport obfuscation

Type: DcOption

Example:

$dcOption = ['_' => 'dcOption', 'ipv6' => Bool, 'media_only' => Bool, 'tcpo_only' => Bool, 'cdn' => Bool, 'static' => Bool, 'id' => int, 'ip_address' => 'string', 'port' => int, 'secret' => 'bytes'];

Or, if you're into Lua:

dcOption={_='dcOption', ipv6=Bool, media_only=Bool, tcpo_only=Bool, cdn=Bool, static=Bool, id=int, ip_address='string', port=int, secret='bytes'}