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

Auto-assign Ids to new messages (WS Client) #318

Closed
FredTungsten opened this issue Nov 24, 2017 · 0 comments
Closed

Auto-assign Ids to new messages (WS Client) #318

FredTungsten opened this issue Nov 24, 2017 · 0 comments
Labels
bug Something is broken library Issues that span all parts of the library (usually code style related)
Milestone

Comments

@FredTungsten
Copy link
Contributor

The way it is now new messages keep their default id of -1 and concurrent messages get lost.

@blackspherefollower blackspherefollower self-assigned this Nov 24, 2017
@blackspherefollower blackspherefollower added bug Something is broken library Issues that span all parts of the library (usually code style related) labels Nov 24, 2017
@blackspherefollower blackspherefollower added this to the v0.1.3 milestone Nov 24, 2017
blackspherefollower added a commit to blackspherefollower/buttplug-csharp that referenced this issue Nov 25, 2017
Many of the default message constructors were setting the message ID to 1 if not otherwise set.
This is no longer the case: they now default to 0 (invalid for client->server messages). This allows the client to detect the that a message ID must be provided and updates it to the next message ID from _counter.

This may cause issues for applications that use the server directly rather than use the WS client, as they no longer have a "good" default ID. They must now be careful to set a valid ID instead.

Fixes buttplugio#318
blackspherefollower added a commit to blackspherefollower/buttplug-csharp that referenced this issue Dec 7, 2017
This means consumers of the library do not need to manually set the message IDs at all now.

Fixes buttplugio#318
blackspherefollower added a commit that referenced this issue Dec 7, 2017
This means consumers of the library do not need to manually set the message IDs at all now.

Fixes #318
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is broken library Issues that span all parts of the library (usually code style related)
Projects
None yet
Development

No branches or pull requests

2 participants