Source File
codec.go
Belonging Package
github.com/gotd/td/transport
package transport
import (
)
// Codec is MTProto transport protocol encoding abstraction.
type Codec interface {
// WriteHeader sends protocol tag if needed.
WriteHeader(w io.Writer) error
// ReadHeader reads protocol tag if needed.
ReadHeader(r io.Reader) error
// Write encode to writer message from given buffer.
Write(w io.Writer, b *bin.Buffer) error
// Read fills buffer with received message.
Read(r io.Reader, b *bin.Buffer) error
}
The pages are generated with Golds v0.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. |