整理依赖库

This commit is contained in:
flswld committed 2023-08-19 23:14:52 +08:00
1 parent aad8d90724
commit 0ce607f7cc
6 files changed
+2 -80

No files matched your search

+1 -1
View File
@@ -23,7 +23,7 @@ import (
func GateLogin(dispatchInfo *DispatchInfo, accountInfo *AccountInfo, keyId string, req *proto.GetPlayerTokenReq, clientSeq uint32) (*net.Session, error, *proto.GetPlayerTokenRsp) {
gateAddr := dispatchInfo.GateIp + ":" + strconv.Itoa(int(dispatchInfo.GatePort))
logger.Debug("connect gate addr: %v", gateAddr)
session, err := net.NewSession(gateAddr, dispatchInfo.DispatchKey, 30000)
session, err := net.NewSession(gateAddr, dispatchInfo.DispatchKey)
if err != nil {
return nil, err, nil
}
+1 -4
View File
@@ -46,10 +46,7 @@ type Session struct {
PktLock sync.Mutex
}
func NewSession(gateAddr string, dispatchKey []byte, localPort int) (*Session, error) {
// // DPDK模式需开启
// conn, err := kcp.DialWithOptions(gateAddr, "0.0.0.0:"+strconv.Itoa(localPort))
func NewSession(gateAddr string, dispatchKey []byte) (*Session, error) {
conn, err := kcp.DialWithOptions(gateAddr)
if err != nil {
logger.Error("kcp client conn to server error: %v", err)