Change rwc to rwc with addresses

This commit is contained in:
9seconds
2018-07-02 16:12:31 +03:00
parent 6fa5f31ca8
commit 09476cc467
15 changed files with 109 additions and 68 deletions
+2 -2
View File
@@ -2,7 +2,6 @@ package telegram
import (
"bufio"
"io"
"io/ioutil"
"net"
"net/http"
@@ -16,6 +15,7 @@ import (
"go.uber.org/zap"
"github.com/9seconds/mtg/mtproto"
"github.com/9seconds/mtg/wrappers"
)
const (
@@ -39,7 +39,7 @@ type middleTelegramCaller struct {
httpClient *http.Client
}
func (t *middleTelegramCaller) Dial(connOpts *mtproto.ConnectionOpts) (io.ReadWriteCloser, error) {
func (t *middleTelegramCaller) Dial(connOpts *mtproto.ConnectionOpts) (wrappers.ReadWriteCloserWithAddr, error) {
dc := connOpts.DC
if dc == 0 {
dc = 1