Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions mtglib/internal/relay/init.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
package relay

const (
copyBufferSize = 64 * 1024
)

type Logger interface {
Printf(msg string, args ...any)
}
3 changes: 2 additions & 1 deletion mtglib/internal/relay/relay.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"io"

"github.com/9seconds/mtg/v2/essentials"
"github.com/9seconds/mtg/v2/mtglib/internal/tls"
)

func Relay(ctx context.Context, log Logger, telegramConn, clientConn essentials.Conn) {
Expand Down Expand Up @@ -35,7 +36,7 @@ func Relay(ctx context.Context, log Logger, telegramConn, clientConn essentials.
}

func pump(log Logger, src, dst essentials.Conn, direction string) {
var buf [copyBufferSize]byte
var buf [tls.MaxRecordPayloadSize]byte

defer src.CloseRead() //nolint: errcheck
defer dst.CloseWrite() //nolint: errcheck
Expand Down
Loading