-
Notifications
You must be signed in to change notification settings - Fork 118
feat(network): Send product information to distinguish clients (with a colored name and different status) #1404
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
base: main
Are you sure you want to change the base?
Changes from 2 commits
f066518
c4e3f1d
f0b8460
fedb4a6
87193b6
eb84ebf
f4177d4
8caeda6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -277,6 +277,13 @@ class LANAPI : public LANAPIInterface | |
| void handleGameOptions( LANMessage *msg, UnsignedInt senderIP ); | ||
| void handleInActive( LANMessage *msg, UnsignedInt senderIP ); | ||
|
|
||
| void handlePatchInfo(Int messageType, UnsignedInt senderIP, UnicodeString gameName); | ||
| void handleGameRequestPatchInfo(LANMessage *msg, UnsignedInt senderIP); | ||
| void handleGameAcknowledgePatchInfo(LANMessage *msg, UnsignedInt senderIP); | ||
| void handleLobbyRequestPatchInfo(LANMessage *msg, UnsignedInt senderIP); | ||
| void handleLobbyAcknowledgePatchInfo(LANMessage *msg, UnsignedInt senderIP); | ||
| void handleMatchRequestPatchInfo(LANMessage *msg, UnsignedInt senderIP); | ||
| void handleMatchAcknowledgePatchInfo(LANMessage *msg, UnsignedInt senderIP); | ||
| }; | ||
|
|
||
|
|
||
|
|
@@ -313,6 +320,14 @@ struct LANMessage | |
| MSG_INACTIVE, ///< I've alt-tabbed out. Unaccept me cause I'm a poo-flinging monkey. | ||
|
|
||
| MSG_REQUEST_GAME_INFO, ///< For direct connect, get the game info from a specific IP Address | ||
|
|
||
| // Community patch | ||
Caball009 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| MSG_GAME_REQUEST_PATCH_INFO = 1000, | ||
| MSG_GAME_ACKNOWLEDGE_PATCH_INFO, | ||
| MSG_LOBBY_REQUEST_PATCH_INFO, | ||
| MSG_LOBBY_ACKNOWLEDGE_PATCH_INFO, | ||
| MSG_MATCH_REQUEST_PATCH_INFO, | ||
| MSG_MATCH_ACKNOWLEDGE_PATCH_INFO, | ||
| } messageType; | ||
|
|
||
| WideChar name[g_lanPlayerNameLength+1]; ///< My name, for convenience | ||
|
|
@@ -407,6 +422,11 @@ struct LANMessage | |
| char options[m_lanMaxOptionsLength+1]; | ||
| } GameOptions; | ||
|
|
||
| struct | ||
| { | ||
| WideChar gameName[g_lanGameNameLength + 1]; | ||
Caball009 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| UnsignedInt patchVersion; | ||
|
||
| } PatchInfo; | ||
Caball009 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| }; | ||
| }; | ||
| #pragma pack(pop) | ||
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.
Is "Acknowledge" synonymous for replying to the request message? Perhaps call it "Response". And add it to the end of the name.
Even when that breaks the current EA naming pattern, it is a better naming pattern in my opinion.
This comment was marked as outdated.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
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.
Yes, 'Acknowledge' is a response to a patch info request.
Should the enum still contain 'ACKNOWLEDGE'? (e.g.
MSG_GAME_ACKNOWLEDGE_PATCH_INFO)There's also a bunch of comments where I'm currently using the term 'acknowledge'.
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.
I asked Chat what ACK refers to in Networking:
🧩 Definition
In networking, to acknowledge means:
So when one device sends data to another, the receiver acknowledges it by sending back a message (an acknowledgment, or ACK) saying essentially:
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.
Use ACK terminology only to confirm the receipt of a message, not for a response to a request. When the message is a request and in need of a response, then use the term "Response" for the response.
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.
I have moved away from 'acknowledge' now, except for in a few of the comments.