Skip to content
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

Fix match and party data message callbacks #79

Merged
merged 6 commits into from
Jun 14, 2024

Conversation

britzl
Copy link
Collaborator

@britzl britzl commented Jun 12, 2024

The socket code expected all messages to return a response from the server when in fact match and party data messages are "fire and forget". This change makes sure that match data and party data message complete immediately when the message has been sent. The message callback handling has also been improved and moved from the engine specific code to the generic socket code.

Fixes #77

@britzl britzl requested a review from gpene June 13, 2024 05:42
@@ -15,6 +15,13 @@
if message.match_data then
message.match_data.data = b64.decode(message.match_data.data)
end
if message.cid then
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved from defold.lua to the generated socket.lua

@@ -260,10 +286,13 @@ def messages_to_lua(rtapi):
STATUS_MESSAGES = [ "StatusFollow", "StatusUnfollow", "StatusUpdate" ]
ALL_MESSAGES = CHANNEL_MESSAGES + MATCH_MESSAGES + MATCHMAKER_MESSAGES + PARTY_MESSAGES + STATUS_MESSAGES

NO_CALLBACK_MESSAGES = [ "MatchDataSend", "PartyDataSend" ]
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These two messages are the ones that seem to not set a cid in other client implementations (for instance nakama-dotnet)

@britzl britzl requested a review from lugehorsam June 13, 2024 05:45
@britzl britzl merged commit 80d46d4 into master Jun 14, 2024
3 checks passed
@britzl britzl deleted the issue-77-no-match-data-response branch June 14, 2024 08:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sending match data does not invoke a response
2 participants