Skip to content

Commit

Permalink
mv io.go to internal
Browse files Browse the repository at this point in the history
  • Loading branch information
lixin9311 committed Feb 15, 2020
1 parent 9fae4e6 commit 8280d39
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion io.go → internal/io.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package main
package internal

import (
"io"
Expand Down
3 changes: 2 additions & 1 deletion tcp.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"net"
"time"

"github.com/shadowsocks/go-shadowsocks2/internal"
"github.com/shadowsocks/go-shadowsocks2/socks"
)

Expand Down Expand Up @@ -172,7 +173,7 @@ func helper(rc, c net.Conn, header []byte) (int64, int64, error) {
ch <- res{n, err}
}()

n, err := io.Copy(rc, ReaderWithHeader(c, header))
n, err := io.Copy(rc, internal.ReaderWithHeader(c, header))
c.SetDeadline(time.Now()) // wake up the other goroutine blocking on right
rc.SetDeadline(time.Now()) // wake up the other goroutine blocking on left
rs := <-ch
Expand Down

0 comments on commit 8280d39

Please sign in to comment.