mirror of
https://github.com/ScuroNeko/mtg.git
synced 2026-08-31 20:14:01 +03:00
Simplify internals
This commit is contained in:
@@ -2,21 +2,19 @@ package protocol
|
||||
|
||||
import (
|
||||
"github.com/9seconds/mtg/conntypes"
|
||||
"github.com/9seconds/mtg/telegram"
|
||||
"github.com/9seconds/mtg/wrappers"
|
||||
)
|
||||
|
||||
type ClientProtocol interface {
|
||||
Handshake(wrappers.StreamReadWriteCloser) (wrappers.StreamReadWriteCloser, error)
|
||||
GetConnectionType() conntypes.ConnectionType
|
||||
GetConnectionProtocol() conntypes.ConnectionProtocol
|
||||
GetDC() conntypes.DC
|
||||
ConnectionType() conntypes.ConnectionType
|
||||
ConnectionProtocol() conntypes.ConnectionProtocol
|
||||
DC() conntypes.DC
|
||||
}
|
||||
|
||||
type ClientProtocolMaker func() ClientProtocol
|
||||
|
||||
type TelegramProtocol interface {
|
||||
Handshake(*TelegramRequest) (wrappers.Wrap, error)
|
||||
}
|
||||
|
||||
type TelegramProtocolMaker func(telegram.Telegram) TelegramProtocol
|
||||
type ClientProtocolMaker func() ClientProtocol
|
||||
type TelegramProtocolMaker func() TelegramProtocol
|
||||
|
||||
Reference in New Issue
Block a user