miniproto.session.models.DCOption
miniproto.session.models.DCOption
Section titled “miniproto.session.models.DCOption”DCOption(id: int, ip_address: str, port: int, ipv6: bool = False, media_only: bool = False, tcpo_only: bool = False, static: bool = False, secret: bytes | None = None) -> NoneOne validated Telegram data-centre endpoint and optional transport secret.
Attributes:
- id (
int) – Positive data-centre identifier. - ip_address (
str) – Non-empty endpoint address. - port (
int) – Endpoint TCP port from 1 through 65535. - ipv6 (
bool) – Whether the address is IPv6. - media_only (
bool) – Whether this endpoint serves only media requests. - tcpo_only (
bool) – Whether this endpoint is TCP-obfuscated-only. - static (
bool) – Whether Telegram marks this option static. - secret (
bytes | None) – Optional copied transport secret, hidden fromrepr.
Raises:
ValueError– If the ID, address, or port is invalid.