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

Fix sending multiple segment messages #179

Merged
merged 3 commits into from
Feb 14, 2023
Merged

Fix sending multiple segment messages #179

merged 3 commits into from
Feb 14, 2023

Conversation

affederaffe
Copy link
Contributor

When sending non-single-segmented buffers, only the first segment was incorrectly sent over and over again.

@affederaffe affederaffe mentioned this pull request Dec 29, 2022
3 tasks
namespace Tmds.DBus.Protocol;

internal ref struct SignatureReader
Copy link
Owner

Choose a reason for hiding this comment

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

This change is not related to the multi-segment send.

@affederaffe are you using this? Which member exactly?

Copy link
Owner

Choose a reason for hiding this comment

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

If you would like to have this type exposed, please make a separate PR, and only make the members you need public.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think I was using it for the source generator at some point, though I removed it since it creates an explicit dependency on Tmds.DBus.Protocol. Reverted the relevant commit.

@@ -94,7 +94,7 @@ private async void ReadMessagesIntoSocket()
SequencePosition position = buffer.Start;
while (buffer.TryGet(ref position, out ReadOnlyMemory<byte> memory))
{
await _socket.SendAsync(buffer.First, handles).ConfigureAwait(false);
await _socket.SendAsync(memory, handles).ConfigureAwait(false);
Copy link
Owner

Choose a reason for hiding this comment

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

👍

@tmds tmds merged commit f1f2b4d into tmds:main Feb 14, 2023
@tmds
Copy link
Owner

tmds commented Feb 14, 2023

@affederaffe thanks!

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

Successfully merging this pull request may close these issues.

2 participants