added more client-side endpoints

This commit is contained in:
2025-03-26 23:44:41 +09:00
parent 5dbe9cd34e
commit 0cfd241e00
5 changed files with 426 additions and 21 deletions

View File

@ -54,6 +54,17 @@ func (cpc *ClientPeerConn) RunTask(wg *sync.WaitGroup) error {
cpc.route.cts.psc.Send(MakePeerStoppedPacket(cpc.route.Id, cpc.conn_id, cpc.conn.RemoteAddr().String(), cpc.conn.LocalAddr().String())) // nothing much to do upon failure. no error check here
cpc.ReqStop()
cpc.route.RemoveClientPeerConn(cpc)
cpc.route.cts.C.ptc_mtx.Lock()
cpc.route.cts.C.ptc_list.Remove(cpc.node_in_client)
cpc.node_in_client = nil
cpc.route.cts.C.ptc_mtx.Unlock()
cpc.route.cts.ptc_mtx.Lock()
cpc.route.cts.ptc_list.Remove(cpc.node_in_conn)
cpc.node_in_conn = nil
cpc.route.cts.ptc_mtx.Unlock()
return nil
}