-
Notifications
You must be signed in to change notification settings - Fork 13
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
Conversation
@@ -15,6 +15,13 @@ | |||
if message.match_data then | |||
message.match_data.data = b64.decode(message.match_data.data) | |||
end | |||
if message.cid then |
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.
Moved from defold.lua to the generated socket.lua
codegen/realtime.py
Outdated
@@ -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" ] |
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.
These two messages are the ones that seem to not set a cid
in other client implementations (for instance nakama-dotnet)
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