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

Change Id method #136

Closed
Per6 opened this issue Mar 19, 2024 · 2 comments
Closed

Change Id method #136

Per6 opened this issue Mar 19, 2024 · 2 comments
Labels
Already Exists The requested feature/functionality already exists Feature Request New feature or request

Comments

@Per6
Copy link

Per6 commented Mar 19, 2024

Can a ChangeId(ushort id) function be implemented for messages? i would use that for messages, that a server just needs to resend to somewhere else.

@Per6 Per6 changed the title Improve resending messages make resending messages easier Mar 19, 2024
@tom-weiland tom-weiland added the Feature Request New feature or request label Mar 20, 2024
@tom-weiland
Copy link
Collaborator

What ID would this ChangeID method change? Are you talking about a message to which you've written a client's ID via AddUShort, and now you want to send that same message again with the same data except for the ID value?

You can use the SetBits method to overwrite a range of bit starting at a given bit, which should do what you want (if I've understood correctly).

@tom-weiland tom-weiland added the Already Exists The requested feature/functionality already exists label Mar 20, 2024
@Per6 Per6 changed the title make resending messages easier Change Id method Mar 20, 2024
@Per6
Copy link
Author

Per6 commented Mar 20, 2024

yes, you've understood correctly. While trying to program that i learned, i can just resend it with the same id and it'll go to the client because it was sent from the server.

@Per6 Per6 closed this as completed Mar 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Already Exists The requested feature/functionality already exists Feature Request New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants