mirror of
https://github.com/ScuroNeko/mtg.git
synced 2026-08-31 15:34:01 +03:00
FILE / ScuroNeko/mtg
protocol/interfaces.go
Исходный файл и его история в репозитории.
17 lines
449 B
Go
17 lines
449 B
Go
package protocol
|
|
|
|
import (
|
|
"github.com/9seconds/mtg/conntypes"
|
|
"github.com/9seconds/mtg/wrappers"
|
|
)
|
|
|
|
type ClientProtocol interface {
|
|
Handshake(wrappers.StreamReadWriteCloser) (wrappers.StreamReadWriteCloser, error)
|
|
ConnectionType() conntypes.ConnectionType
|
|
ConnectionProtocol() conntypes.ConnectionProtocol
|
|
DC() conntypes.DC
|
|
}
|
|
|
|
type TelegramProtocol func(*TelegramRequest) (wrappers.Wrap, error)
|
|
type ClientProtocolMaker func() ClientProtocol
|