# danog\MadelineProto\Settings\Connection

Back to index

Author: Daniil Gentili daniil@daniil.it

Connection settings.

# Method list:

# Methods:

# getProtocol(): string

Get protocol identifier.

# setProtocol(class-string<\danog\MadelineProto\Stream\MTProtoBufferInterface> $protocol): self

Set protocol identifier. Available MTProto transport protocols (smaller overhead is better):

Parameters:

# See also:

# getIpv6(): bool

Get whether to use ipv6.

# setIpv6(bool $ipv6): self

Set whether to use ipv6.

Parameters:

# getSslSubdomains(): array

Get subdomains of web.telegram.org for https protocol.

# setSslSubdomains(array $sslSubdomains): self

Set subdomains of web.telegram.org for https protocol.

Parameters:

# getMinMediaSocketCount(): int

Get minimum media socket count.

# setMinMediaSocketCount(int $minMediaSocketCount): self

Set minimum media socket count.

Parameters:

# getMaxMediaSocketCount(): int

Get maximum media socket count.

# setMaxMediaSocketCount(int $maxMediaSocketCount): self

Set maximum media socket count.

Parameters:

# getRobinPeriod(): int

Get robin period (seconds).

# setRobinPeriod(int $robinPeriod): self

Set robin period (seconds).

Parameters:

# getDefaultDc(): int

Get default DC ID.

# getDefaultDcParams(): array

Get default DC params.

# setDefaultDc(int $defaultDc): self

Set default DC ID.

Parameters:

# getProxies(): array

Get proxy identifiers.

Fully typed return value:

array<class-string<\danog\MadelineProto\Stream\StreamInterface>, array>

# See also:

# addProxy(class-string<\danog\MadelineProto\Stream\StreamInterface> $proxy, array $extra): self

Add proxy identifier to list, one of:

Parameters:

# See also:

# setProxy(array $proxies): self

Set proxies.

Parameters:

# clearProxies(): self

Clear proxies.

# removeProxy(string $proxy, array $extra): self

Remove specific proxy pair.

Parameters:

# getObfuscated(): bool

Get whether to use the obfuscated protocol: useful to bypass ISP blocks.

# setObfuscated(bool $obfuscated): self

Set whether to use the obfuscated protocol: useful to bypass ISP blocks.

Parameters:

# getTestMode(): bool

Get whether we’re in test mode.

# setTestMode(bool $testMode): self

Set whether we’re in test mode.

Parameters:

# getTransport(): class-string<\danog\MadelineProto\Stream\RawStreamInterface>

Get transport identifier.

# See also:

# setTransport(class-string<\danog\MadelineProto\Stream\RawStreamInterface> $transport): self

Sets the transport protocol to use when connecting to telegram. Not supported by HTTP and HTTPS protocols, obfuscation must be enabled.

Parameters:

# See also:

# getRetry(): bool

Get whether to retry connection.

# setRetry(bool $retry): self

Set whether to retry connection.

Parameters:

# getTimeout(): int

Get connection timeout.

# setTimeout(int $timeout): self

Set connection timeout.

Parameters:

# getUseDoH(): bool

Get whether to use DNS over HTTPS.

# setUseDoH(bool $useDoH): self

Set whether to use DNS over HTTPS.

Parameters:

# getBindTo(): ?string

Get bind on specific address and port.

# setBindTo(?string $bindTo): self

Set bind on specific address and port.

Parameters:


Generated by danog/phpdoc

This site uses cookies, as described in the cookie policy. By clicking on "Accept" you consent to the use of cookies.