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

Dynamic size of PresenceResponse #140

Closed
ShortDevelopment opened this issue Mar 12, 2024 · 0 comments · Fixed by #141
Closed

Dynamic size of PresenceResponse #140

ShortDevelopment opened this issue Mar 12, 2024 · 0 comments · Fixed by #141
Assignees
Labels
area::Receive Receive type::bug Something isn't working

Comments

@ShortDevelopment
Copy link
Member

PresenceResponse is currently using a hard-coded length but is dynamic in size (it contains the device name).

new CommonHeader()
{
Type = MessageType.Discovery,
MessageLength = 97
}.Write(writer);
new DiscoveryHeader()
{
Type = DiscoveryType.PresenceResponse
}.Write(writer);
_presenceResponse.Write(writer);

Therefore this message can't be parsed by other devices and receiving is not possible.


See nearby-sharing/cli#1 (comment)

@electr1fy0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area::Receive Receive type::bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant