rename func

This commit is contained in:
2020-02-22 21:26:22 +08:00
parent 21d698317d
commit 0a2f104ee6

View File

@@ -63,11 +63,11 @@ func serverTcpListen(tcpListen TcpListen) {
continue continue
} }
fmt.Printf("[INFO] TCP connection from %v, local: %v\n", conn.RemoteAddr(), conn.LocalAddr()) fmt.Printf("[INFO] TCP connection from %v, local: %v\n", conn.RemoteAddr(), conn.LocalAddr())
go handleRequest(tcpListen, conn) go handleTcpRequest(tcpListen, conn)
} }
} }
func handleRequest(tcpListen TcpListen, sconn net.Conn) { func handleTcpRequest(tcpListen TcpListen, sconn net.Conn) {
defer sconn.Close() defer sconn.Close()
ip := tcpListen.Backend ip := tcpListen.Backend
dconn, err := net.Dial("tcp", ip) dconn, err := net.Dial("tcp", ip)