1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2025-10-17 22:44:08 -04:00

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

View File

@@ -10,7 +10,7 @@ import (
"github.com/v2ray/v2ray-core/common/log"
v2net "github.com/v2ray/v2ray-core/common/net"
"github.com/v2ray/v2ray-core/proxy"
"github.com/v2ray/v2ray-core/transport/listener"
"github.com/v2ray/v2ray-core/transport/hub"
)
type DokodemoDoor struct {
@@ -21,7 +21,7 @@ type DokodemoDoor struct {
address v2net.Address
port v2net.Port
space app.Space
tcpListener *listener.TCPListener
tcpListener *hub.TCPListener
udpConn *net.UDPConn
listeningPort v2net.Port
}
@@ -132,7 +132,7 @@ func (this *DokodemoDoor) handleUDPPackets() {
}
func (this *DokodemoDoor) ListenTCP(port v2net.Port) error {
tcpListener, err := listener.ListenTCP(port, this.HandleTCPConnection)
tcpListener, err := hub.ListenTCP(port, this.HandleTCPConnection)
if err != nil {
log.Error("Dokodemo: Failed to listen on port ", port, ": ", err)
return err
@@ -143,7 +143,7 @@ func (this *DokodemoDoor) ListenTCP(port v2net.Port) error {
return nil
}
func (this *DokodemoDoor) HandleTCPConnection(conn *listener.TCPConn) {
func (this *DokodemoDoor) HandleTCPConnection(conn *hub.TCPConn) {
defer conn.Close()
packet := v2net.NewPacket(v2net.TCPDestination(this.address, this.port), nil, true)