mirror of
https://github.com/PretendoNetwork/splatoon.git
synced 2026-08-02 08:12:27 -05:00
feat: swap station urls
This commit is contained in:
parent
26b651f2d5
commit
fb3680d673
|
|
@ -1,6 +1,9 @@
|
|||
package nex
|
||||
|
||||
import (
|
||||
"slices"
|
||||
|
||||
"github.com/PretendoNetwork/nex-go/v2"
|
||||
"github.com/PretendoNetwork/nex-go/v2/types"
|
||||
commonmatchmaking "github.com/PretendoNetwork/nex-protocols-common-go/v2/match-making"
|
||||
commonmatchmakingext "github.com/PretendoNetwork/nex-protocols-common-go/v2/match-making-ext"
|
||||
|
|
@ -28,11 +31,17 @@ func cleanupMatchmakeSessionSearchCriteriasHandler(searchCriterias types.List[ma
|
|||
}
|
||||
}
|
||||
|
||||
func adjustPublicStationFirst(packet nex.PacketInterface, urls types.List[types.StationURL], dataHolder types.DataHolder) {
|
||||
connection := packet.Sender().(*nex.PRUDPConnection)
|
||||
slices.Reverse(connection.StationURLs)
|
||||
}
|
||||
|
||||
func registerCommonSecureServerProtocols() {
|
||||
secureProtocol := secure.NewProtocol()
|
||||
globals.SecureEndpoint.RegisterServiceProtocol(secureProtocol)
|
||||
commonSecureProtocol := commonsecure.NewCommonProtocol(secureProtocol)
|
||||
commonSecureProtocol.EnableInsecureRegister()
|
||||
commonSecureProtocol.OnAfterRegisterEx = adjustPublicStationFirst
|
||||
commonSecureProtocol.CreateReportDBRecord = CreateReportDBRecord
|
||||
|
||||
natTraversalProtocol := nattraversal.NewProtocol()
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user