func NewTCPGroup(ctl *TCPGroupCtl) *TCPGroup {
	return &TCPGroup{
		lns:      make([]*TCPGroupListener, 0),
		ctl:      ctl,
		acceptCh: make(chan net.Conn),
	}
}
NewTCPGroup return a new TCPGroup
package group
import (
	"fmt"
	"net"
	"sync"
	"github.com/fatedier/frp/server/ports"
	gerr "github.com/fatedier/golib/errors"
)
type TCPGroupCtl struct {
	groups map[string]*TCPGroup
	portManager *ports.Manager
	mu          sync.Mutex
}
func NewTCPGroupCtl(portManager *ports.Manager) *TCPGroupCtl {
	return &TCPGroupCtl{
		groups:      make(map[string]*TCPGroup),
		portManager: portManager,
	}
}
func (tgc *TCPGroupCtl) Listen(proxyName string, group string, groupKey string,
	addr string, port int) (l net.Listener, realPort int, err error) {
	tgc.mu.Lock()
	tcpGroup, ok := tgc.groups[group]
	if !ok {
		tcpGroup = NewTCPGroup(tgc)
		tgc.groups[group] = tcpGroup
	}
	tgc.mu.Unlock()
	return tcpGroup.Listen(proxyName, group, groupKey, addr, port)
}
func (tgc *TCPGroupCtl) RemoveGroup(group string) {
	tgc.mu.Lock()
	defer tgc.mu.Unlock()
	delete(tgc.groups, group)
}
type TCPGroup struct {
	group    string
	groupKey string
	addr     string
	port     int
	realPort int
	acceptCh chan net.Conn
	index    uint64
	tcpLn    net.Listener
	lns      []*TCPGroupListener
	ctl      *TCPGroupCtl
	mu       sync.Mutex
}