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

MultiServer: Add slot to SetReply packets #3747

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

NewSoupVi
Copy link
Member

@NewSoupVi NewSoupVi commented Aug 8, 2024

Alternative / generic solution for #3117

Upside of this one being that clients do not need to change to support the new EnergyLink protocol.

Tested: Ran MultiServer.py --log_network, connected with a client that sends datastorage Set operations, verified that outgoing SetReply packets contain slot: 1

@github-actions github-actions bot added the affects: core Issues/PRs that touch core and may need additional validation. label Aug 8, 2024
@NewSoupVi NewSoupVi added is: enhancement Issues requesting new features or pull requests implementing new features. waiting-on: peer-review Issue/PR has not been reviewed by enough people yet. labels Aug 8, 2024
@NewSoupVi NewSoupVi changed the title MultiServer: Add slot argument to SetReply packets MultiServer: Add slot to SetReply packets Aug 8, 2024
@Jarno458
Copy link
Collaborator

Jarno458 commented Aug 9, 2024

That would indeed simplify #3117 a lot and could also be useful for other scenario's but, maybe there is a case to be made to keep some set packets anonymous? well i do be in favour of this change

@NewSoupVi
Copy link
Member Author

maybe there is a case to be made to keep some set packets anonymous

Actually, in my opinion, clients should be required to expose themselves - I don't really see the value in slot-anonymous packets in the AP ecosystem (other than to save space maybe)

@Jarno458
Copy link
Collaborator

Jarno458 commented Aug 9, 2024

One more thing to consider, while i don't think its a problem, this would technically be a breaking change, as currently clients can add any arguments they want to the set packet to be received in the reply, and some might already use the field slot that your than overriding

@NewSoupVi
Copy link
Member Author

NewSoupVi commented Aug 9, 2024

One more thing to consider, while i don't think its a problem, this would technically be a breaking change, as currently clients can add any arguments they want to the set packet to be received in the reply, and some might already use the field slot that your than overriding

That's true. I would imagine they would simply be filling it with the same thing I'm currently overriding it with though. Either way, if it's an issue, I could

  1. Use setdefault
  2. Use a more explicit name that's less likely to already be in use (e.g. originating_slot_number)

But I don't really like 1, because then it's not reliable, and I kinda don't like 2. because it's nice that slot is a really short, memory efficient word :D

@Jarno458
Copy link
Collaborator

Jarno458 commented Aug 9, 2024

Agreed, i do like the simplicity of slot, (inb4 someone asks for team)

Copy link
Collaborator

@agilbert1412 agilbert1412 left a comment

Choose a reason for hiding this comment

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

I can't speak for if this is better than #3117, but the code looks good to me

@Exempt-Medic Exempt-Medic added waiting-on: core-review Issue/PR has been peer-reviewed and is ready to be merged or needs input from a core maintainer. and removed waiting-on: peer-review Issue/PR has not been reviewed by enough people yet. labels Aug 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects: core Issues/PRs that touch core and may need additional validation. is: enhancement Issues requesting new features or pull requests implementing new features. waiting-on: core-review Issue/PR has been peer-reviewed and is ready to be merged or needs input from a core maintainer.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants