rename transport/listener to hub

This commit is contained in:
Darien Raymond
2016-01-28 16:08:32 +00:00
parent 30f131b9ee
commit 925c06aeed
6 changed files with 21 additions and 21 deletions
+4 -4
View File
@@ -12,7 +12,7 @@ import (
v2net "github.com/v2ray/v2ray-core/common/net"
"github.com/v2ray/v2ray-core/proxy"
"github.com/v2ray/v2ray-core/proxy/internal"
"github.com/v2ray/v2ray-core/transport/listener"
"github.com/v2ray/v2ray-core/transport/hub"
)
type Shadowsocks struct {
@@ -20,7 +20,7 @@ type Shadowsocks struct {
config *Config
port v2net.Port
accepting bool
tcpListener *listener.TCPListener
tcpListener *hub.TCPListener
}
func (this *Shadowsocks) Port() v2net.Port {
@@ -42,7 +42,7 @@ func (this *Shadowsocks) Listen(port v2net.Port) error {
}
}
tcpListener, err := listener.ListenTCP(port, this.handleConnection)
tcpListener, err := hub.ListenTCP(port, this.handleConnection)
if err != nil {
log.Error("Shadowsocks: Failed to listen on port ", port, ": ", err)
return err
@@ -52,7 +52,7 @@ func (this *Shadowsocks) Listen(port v2net.Port) error {
return nil
}
func (this *Shadowsocks) handleConnection(conn *listener.TCPConn) {
func (this *Shadowsocks) handleConnection(conn *hub.TCPConn) {
defer conn.Close()
buffer := alloc.NewSmallBuffer()