support xtcp for making nat hole

This commit is contained in:
fatedier
2017-10-24 18:20:07 +08:00
parent 6320f15a7c
commit 0559865fe5
15 changed files with 676 additions and 24 deletions

View File

@@ -271,9 +271,10 @@ func (ctl *Control) login() (err error) {
ctl.conn = conn
// update runId got from server
ctl.setRunId(loginRespMsg.RunId)
config.ClientCommonCfg.ServerUdpPort = loginRespMsg.ServerUdpPort
ctl.ClearLogPrefix()
ctl.AddLogPrefix(loginRespMsg.RunId)
ctl.Info("login to server success, get run id [%s]", loginRespMsg.RunId)
ctl.Info("login to server success, get run id [%s], server udp port [%d]", loginRespMsg.RunId, loginRespMsg.ServerUdpPort)
// login success, so we let closedCh available again
ctl.closedCh = make(chan int)