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

New ping/pong mechanism #28

Open
apes0 opened this issue Jun 5, 2022 · 2 comments
Open

New ping/pong mechanism #28

apes0 opened this issue Jun 5, 2022 · 2 comments

Comments

@apes0
Copy link
Contributor

apes0 commented Jun 5, 2022

New ping/pong messages

The ping and pong messages have been modified, now instead of being 0xB00B and 0xB00C, they are created as follows:

  • ping: 0x0B + a blob consisting of the message id of the client (as a uint32)
  • pong: 0x0C + a blob consisting of the message id of the server (again as a uint32)
note: the message ids are basically like the ones of the extracted tag message's ids

Other findings about the messages

There seems to be a new "feature" that makes pings rarer. It skips every second ping, by doing this:

...
pingID++;
if (!fasterPingRequirement && (pingID % 2) !== 0) {
	return;
}
...

(pingID just being the number of the ping message and fasterPingRequirement being whether not to skip every second ping, which currently seems to be always set to false)

note: pingID is only used here, and the ids in pings/pongs are the message ids of the party who is sending them :-)
@Sup3rFire
Copy link
Contributor

fasterPingRequirement is only used when in gameplay

@apes0
Copy link
Contributor Author

apes0 commented Jul 23, 2022

Ah, my bad, i thought it was a constant haha. :p

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

No branches or pull requests

2 participants