Layer 220
constructor
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;

Parameters

Name Type Description
Flags # Flags, see TL conditional fields
Ipv6 flags.0?true Whether the specified IP is an IPv 6 address
MediaOnly flags.1?true Whether this DC should only be used to download or upload files
TcpoOnly flags.2?true Whether this DC only supports connection with transport obfuscation
Cdn flags.3?true Whether this is a CDN DC.
Static flags.4?true If set, this IP should be used when connecting through a proxy
ThisPortOnly flags.5?true If set, clients must connect using only the specified port, without trying any other port.
Id int DC ID
IpAddress string IP address of DC
Port int Port
Secret flags.10?bytes If the tcpo_only flag is set, specifies the secret to use when connecting using transport obfuscation

Returns

DcOption

Gogram Example

// Creating DcOption constructor
obj := &tg.DcOption{
    Id: 0,
    IpAddress: "...",
    Port: 0,

    // Optional fields:
    // Ipv6: true,
    // MediaOnly: true,
    // TcpoOnly: true,
    // Cdn: true,
    // ... more optional fields
}