Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type ErrNotMultiple ¶
type ErrNotMultiple struct {
Len int
}
func (ErrNotMultiple) Error ¶
func (e ErrNotMultiple) Error() string
type Mode ¶
type Mode interface { WriteMsg([]byte) error // this is not same as the io.Writer ReadMsg() ([]byte, error) // contains filtered or unexported methods }
Mode is an interface which handles many ways as the connection sides must determine the size of the transmitted messages. Unlike HTTP or UDP connections, raw TCP connections, as well as WebSockets doesn't have a standard way to determine the size of the transmitted or received message: their main purpose is just to transmit bytes with right order. Mode allows the sides of the connection don't analyze traffic or use any end message sequence. In fact, in MTProto world, Mode works like microprotocol, which is packaging messages in the container that announces its size in advance
Click to show internal directories.
Click to hide internal directories.