Options of Conn. AckBatchSize is maximum ack-s to buffer. AckInterval is maximum time to buffer ack. Cipher defines message crypto. Clock is current time source. Defaults to system time. CompressThreshold is a threshold in bytes to determine that message
is large enough to be compressed using GZIP.
If < 0, compression will be disabled.
If == 0, default value will be used. DC is datacenter ID for key exchange.
Defaults to 2. DialTimeout is timeout of creating connection. ExchangeTimeout is timeout of every key exchange request. Handler will be called on received message. Key that can be used to restore previous connection. Logger is instance of zap.Logger. No logs by default. MaxRetries is max retry count until rpc request failure. MessageID is message id source. Share source between connection to
reduce collision probability. PingInterval is duration between ping_delay_disconnect request. PingTimeout sets ping_delay_disconnect timeout. PublicKeys of telegram.
If not provided, embedded public keys will be used. Random is random source. Defaults to crypto. RequestTimeout is function which returns request timeout for given type ID. RetryInterval is duration between retries. Salt from server that can be used to restore previous connection. SaltFetchInterval is duration between get_future_salts request. Tracer for OTEL. Types map, used in verbose logging of incoming message. engine for replacing RPC engine.(*Options) setDefaultPublicKeys()(*Options) setDefaults()
func github.com/gotd/td/internal/pool.(*SyncSession).Options(opts Options) (Options, pool.Session)
func New(dialer Dialer, opt Options) *Conn
func github.com/gotd/td/internal/pool.(*SyncSession).Options(opts Options) (Options, pool.Session)
func github.com/gotd/td/telegram/internal/manager.CreateConn(create Dialer, mode manager.ConnMode, appID int, opts Options, connOpts manager.ConnOptions) *manager.Conn
vendoredKeys parses vendored file _data/public_keys.pem as list of
PEM-encoded public RSA keys.
Most recent key list can be found on https://my.telegram.org/apps.
Package-Level Variables (total 4, none are exported)
publicKeys is byte blob of new keys added for PQInnerData encryption (key exchange).
See https://github.com/telegramdesktop/tdesktop/commit/95a7ce4622dc24717dc5b95fc99599dddfd4ff6c.
See https://github.com/tdlib/td/commit/e9e24282378fcdb3a3ce020bee4253b65ac98213.
Package-Level Constants (total 6, none are exported)
https://core.telegram.org/mtproto/description#message-identifier-msg-id
A message is rejected over 300 seconds after it is created or 30 seconds
before it is created (this is needed to protect from replay attacks).
https://core.telegram.org/mtproto/description#message-identifier-msg-id
A message is rejected over 300 seconds after it is created or 30 seconds
before it is created (this is needed to protect from replay attacks).
The pages are generated with Goldsv0.6.7. (GOOS=linux GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu.
PR and bug reports are welcome and can be submitted to the issue list.
Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds.