-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deprecate GetRegionalPings
for new GetPingsForRegions
method
#32
base: main
Are you sure you want to change the base?
Conversation
…, and update outdated references
- It's recommended for your backend/matchmaker to provide this map of supported regions; there is a helper function `UHathoraSDK::GetRegionMap()` which provides a hardcoded map of all the regions. | ||
1. A `EHathoraPingType PingType` of either `EHathoraPingType::ICMP` or `EHathoraPingType::UDPEcho`. Both send an ICMP packet; the former uses the ICMP protocol and the latter uses the UDP protocol (expecting an echo response) | ||
1. A callback with the results | ||
1. An optional `int32 NumPingsPerRegion` which defaults to `3` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor: Looks like the numbers got malformed here (all of them are 1.
instead of incrementing)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is markdown syntax which renders a number list in a descending order.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jchu231 Can I merge without changing these? As Jared mentioned, this syntax is automatically rendered properly; it's useful so that if you insert a new step or move steps, you don't have to go back and fix all the numbers. You can see it rendered here: https://github.com/hathora/hathora-unreal-sdk/tree/ms/decouple-api-usage
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM outside of the minor readme typo!
This PR primarily is to provide a new
HathoraSDK::GetPingsForRegions
method which doesn't call the Discovery API, but rather has an argument of the region names/urls to ping. This method also enables optional UDP echo pinging instead of ICPM (default) with another argument.HathoraSDK::GetRegionalPings
has been deprecated with appropriate deprecation messages for both C++ and Blueprints. The readme has been updated accordingly and the lobby example (both the C++ and BP versions) now use the updated version (using the newHathoraSDK::GetRegionMap
method that provides a hardcoded version of all Hathora URLs).Here are the changes to the
W_LobbyMenu.uasset
:^ This used to simply call
GetRegionalPings
^ This looped on
EHathoraCloudRegion
enum to fill things out instead of using the sameGetRegionMap
function.This PR also does some other housekeeping:
DefaultBuildSettings
to useLatest
in the sample project Targets to better support future engine versionsUHathoraSDK::GetServerEnvironment()
to include new injected environment variables