chore: правка форматирования
This commit is contained in:
1 parent
3ee9087323
commit
971b1ac8fc
7 files changed
+8
-7
No files matched your search
+1
-1
@@ -11,6 +11,7 @@ import (
|
||||
"syscall"
|
||||
"time"
|
||||
|
||||
"github.com/pion/dtls/v3"
|
||||
"github.com/samosvalishe/btp/internal/config"
|
||||
"github.com/samosvalishe/btp/internal/logx"
|
||||
"github.com/samosvalishe/btp/internal/proxy/bondserver"
|
||||
@@ -18,7 +19,6 @@ import (
|
||||
"github.com/samosvalishe/btp/internal/proxy/udpserver"
|
||||
"github.com/samosvalishe/btp/internal/transport/dtlsdial"
|
||||
"github.com/samosvalishe/btp/internal/wire/srtpmimicry"
|
||||
"github.com/pion/dtls/v3"
|
||||
)
|
||||
|
||||
// version is populated at build time via -ldflags "-X main.version=...".
|
||||
|
||||
@@ -234,7 +234,9 @@ func writeBondFrameToNextLane(ctx context.Context, lanes []*lane, typ byte, seq
|
||||
|
||||
func (h *Handler) copyBondToTCP(ctx context.Context, connID uint64, tcpConn net.Conn, recvCh <-chan bondframe.Frame) {
|
||||
chunks := bondframe.Reorder(ctx, tcpConn, recvCh, bondframe.ReorderHooks{
|
||||
OnOverflow: func(_ int) { h.Deps.log().Errorf("[bond %d] pending map overflow (>%d), closing", connID, bondframe.PendingCap) },
|
||||
OnOverflow: func(_ int) {
|
||||
h.Deps.log().Errorf("[bond %d] pending map overflow (>%d), closing", connID, bondframe.PendingCap)
|
||||
},
|
||||
OnUnknownType: func(typ byte) { h.Deps.log().Errorf("[bond %d] unknown frame type %d", connID, typ) },
|
||||
OnWriteError: func(err error) { h.Deps.log().Errorf("[bond %d] local TCP write error: %v", connID, err) },
|
||||
OnCloseWrite: h.Deps.log().Debugf,
|
||||
|
||||
@@ -266,7 +266,9 @@ func (c *serverConn) run() {
|
||||
|
||||
func (c *serverConn) copyBondToBackend(backendConn net.Conn) {
|
||||
chunks := bondframe.Reorder(c.ctx, backendConn, c.recvCh, bondframe.ReorderHooks{
|
||||
OnOverflow: func(_ int) { c.deps.log().Errorf("[bond %d] pending map overflow (>%d), closing", c.id, bondframe.PendingCap) },
|
||||
OnOverflow: func(_ int) {
|
||||
c.deps.log().Errorf("[bond %d] pending map overflow (>%d), closing", c.id, bondframe.PendingCap)
|
||||
},
|
||||
OnUnknownType: func(typ byte) { c.deps.log().Errorf("[bond %d] unknown frame type %d", c.id, typ) },
|
||||
OnWriteError: func(err error) { c.deps.log().Errorf("[bond %d] backend write error: %v", c.id, err) },
|
||||
OnCloseWrite: c.deps.log().Debugf,
|
||||
|
||||
@@ -278,4 +278,3 @@ func createSmuxSession(ctx context.Context, deps *Deps, params *Params, peer *ne
|
||||
|
||||
return smuxSess, cleanup, nil
|
||||
}
|
||||
|
||||
@@ -129,4 +129,3 @@ func (c *prefixedConn) Read(p []byte) (int, error) {
|
||||
}
|
||||
return c.Conn.Read(p)
|
||||
}
|
||||
|
||||
@@ -121,7 +121,6 @@ func (c *CountingConn) Read(p []byte) (int, error) {
|
||||
return n, err
|
||||
}
|
||||
|
||||
|
||||
func (c *CountingConn) Write(p []byte) (int, error) {
|
||||
n, err := c.Conn.Write(p)
|
||||
c.Stats.AddTx(n)
|
||||
|
||||
@@ -13,9 +13,9 @@ import (
|
||||
"net"
|
||||
"time"
|
||||
|
||||
"github.com/samosvalishe/btp/internal/netconn"
|
||||
"github.com/pion/logging"
|
||||
"github.com/pion/turn/v5"
|
||||
"github.com/samosvalishe/btp/internal/netconn"
|
||||
)
|
||||
|
||||
// Config конфигурирует один вызов Open.
|
||||
|
||||
Reference in new issue
Block a user