replace xnet.Transport by xnet.Pipe
This commit is contained in:
@@ -194,7 +194,8 @@ func (h *unixHandler) Handle(ctx context.Context, conn net.Conn, opts ...handler
|
||||
|
||||
t := time.Now()
|
||||
log.Infof("%s <-> %s", conn.LocalAddr(), "@")
|
||||
xnet.Transport(conn, cc)
|
||||
// xnet.Transport(conn, cc)
|
||||
xnet.Pipe(ctx, conn, cc)
|
||||
log.WithFields(map[string]any{
|
||||
"duration": time.Since(t),
|
||||
}).Infof("%s >-< %s", conn.LocalAddr(), "@")
|
||||
@@ -245,7 +246,8 @@ func (h *unixHandler) forwardUnix(ctx context.Context, conn net.Conn, target *ch
|
||||
|
||||
t := time.Now()
|
||||
log.Infof("%s <-> %s", conn.LocalAddr(), target.Addr)
|
||||
xnet.Transport(rw, cc)
|
||||
// xnet.Transport(rw, cc)
|
||||
xnet.Pipe(ctx, rw, cc)
|
||||
log.WithFields(map[string]any{
|
||||
"duration": time.Since(t),
|
||||
}).Infof("%s >-< %s", conn.LocalAddr(), target.Addr)
|
||||
|
||||
Reference in New Issue
Block a user