Support different client connection types

This commit is contained in:
9seconds
2018-06-21 09:14:00 +03:00
parent ec548e5779
commit 588475268a
11 changed files with 157 additions and 55 deletions
+2 -1
View File
@@ -5,7 +5,8 @@ import (
"net"
"github.com/9seconds/mtg/config"
"github.com/9seconds/mtg/mtproto"
)
// Init has to initialize client connection based on given config.
type Init func(net.Conn, *config.Config) (int16, io.ReadWriteCloser, error)
type Init func(net.Conn, *config.Config) (*mtproto.ConnectionOpts, io.ReadWriteCloser, error)