mirror of
https://github.com/genxium/DelayNoMore
synced 2025-10-09 08:36:52 +00:00
Enabled backend udp tunnel forwarding.
This commit is contained in:
@@ -257,6 +257,7 @@ cc.Class({
|
||||
joinIndex: self.selfPlayerInfo.JoinIndex,
|
||||
ackingInputFrameId: self.lastAllConfirmedInputFrameId,
|
||||
inputFrameUpsyncBatch: inputFrameUpsyncBatch,
|
||||
authKey: self.selfPlayerInfo.udpTunnelAuthKey,
|
||||
}).finish();
|
||||
if (cc.sys.isNative) {
|
||||
DelayNoMore.UdpSession.broadcastInputFrameUpsync(reqData, window.boundRoomCapacity, self.selfPlayerInfo.JoinIndex);
|
||||
|
@@ -98,6 +98,7 @@ window.handleHbRequirements = function(resp) {
|
||||
} else {
|
||||
console.log(`Handle hb requirements #5, native, bciFrame.battleUdpTunnel=${resp.bciFrame.battleUdpTunnel}, selfPlayerInfo=${JSON.stringify(window.mapIns.selfPlayerInfo)}`);
|
||||
const res1 = DelayNoMore.UdpSession.openUdpSession(8888 + window.mapIns.selfPlayerInfo.JoinIndex);
|
||||
window.mapIns.selfPlayerInfo.udpTunnelAuthKey = resp.bciFrame.battleUdpTunnel.authKey;
|
||||
const intAuthToken = window.mapIns.selfPlayerInfo.intAuthToken;
|
||||
const authKey = Math.floor(Math.random() * 65535);
|
||||
window.mapIns.selfPlayerInfo.authKey = authKey;
|
||||
|
Reference in New Issue
Block a user