package codec

Import Path
	github.com/gotd/td/internal/proto/codec (on go.dev)

Dependency Relation
	imports 8 packages, and imported by 5 packages

Involved Source Files abridged.go codec.go Package codec contains MTProto transport encoding implementations. See https://core.telegram.org/mtproto/mtproto-transports errors.go full.go intermediate.go no_header.go padded_intermediate.go
Package-Level Type Names (total 10, in which 8 are exported)
/* sort exporteds by: | */
Abridged is intermediate MTProto transport. See https://core.telegram.org/mtproto/mtproto-transports#abridged ObfuscatedTag returns protocol tag for obfuscation. Read fills buffer with received message. ReadHeader reads protocol tag. Write encode to writer message from given buffer. WriteHeader sends protocol tag. Abridged : Codec Abridged : TaggedCodec Abridged : github.com/gotd/td/transport.Codec
Codec is MTProto transport protocol encoding abstraction. Read fills buffer with received message. ReadHeader reads protocol tag if needed. Write encode to writer message from given buffer. WriteHeader sends protocol tag if needed. Abridged *Full Intermediate NoHeader PaddedIntermediate TaggedCodec (interface) github.com/gotd/td/transport.Codec (interface) Codec : github.com/gotd/td/transport.Codec func github.com/gotd/td/internal/mtproxy.Secret.ExpectedCodec() (cdc Codec, _ bool)
Full is full MTProto transport. See https://core.telegram.org/mtproto/mtproto-transports#full Read fills buffer with received message. ReadHeader reads protocol tag. Write encode to writer message from given buffer. WriteHeader sends protocol tag. *Full : Codec *Full : github.com/gotd/td/transport.Codec
Intermediate is intermediate MTProto transport. See https://core.telegram.org/mtproto/mtproto-transports#intermediate ObfuscatedTag returns protocol tag for obfuscation. Read fills buffer with received message. ReadHeader reads protocol tag. Write encode to writer message from given buffer. WriteHeader sends protocol tag. Intermediate : Codec Intermediate : TaggedCodec Intermediate : github.com/gotd/td/transport.Codec
NoHeader wraps codec to skip WriteHeader. Codec Codec Read fills buffer with received message. ReadHeader implements Codec. Write encode to writer message from given buffer. WriteHeader implements Codec. NoHeader : Codec NoHeader : github.com/gotd/td/transport.Codec
PaddedIntermediate is intermediate MTProto transport. See https://core.telegram.org/mtproto/mtproto-transports#padded-intermediate ObfuscatedTag returns protocol tag for obfuscation. Read fills buffer with received message. ReadHeader reads protocol tag. Write encode to writer message from given buffer. WriteHeader sends protocol tag. PaddedIntermediate : Codec PaddedIntermediate : TaggedCodec PaddedIntermediate : github.com/gotd/td/transport.Codec
ProtocolErr represents protocol level error. Code int32 ( ProtocolErr) Error() string ProtocolErr : error
TaggedCodec is codec with protocol tag. ObfuscatedTag returns protocol tag for obfuscation. Read fills buffer with received message. ReadHeader reads protocol tag if needed. Write encode to writer message from given buffer. WriteHeader sends protocol tag if needed. Abridged Intermediate PaddedIntermediate TaggedCodec : Codec TaggedCodec : github.com/gotd/td/transport.Codec
Package-Level Functions (total 12, none are exported)
Package-Level Variables (total 6, in which 4 are exported)
AbridgedClientStart is starting bytes sent by client in Abridged mode. Note that server does not respond with it.
ErrProtocolHeaderMismatch means that received protocol header is mismatched with expected.
IntermediateClientStart is starting bytes sent by client in Intermediate mode. Note that server does not respond with it.
PaddedIntermediateClientStart is starting bytes sent by client in Padded intermediate mode. Note that server does not respond with it.
Package-Level Constants (total 4, in which 3 are exported)
CodeAuthKeyNotFound means that specified auth key ID cannot be found by the DC. Also, may be returned during key exchange.
CodeTransportFlood means that too many transport connections are established to the same IP in a too short lapse of time, or if any of the container/service message limits are reached.
CodeWrongDC means that current DC is wrong. Usually returned by server when key exchange sends wrong DC ID.