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

Plumbing for more async/await work #1281

Merged
merged 9 commits into from
Jan 25, 2024

Conversation

jacobslusser
Copy link
Contributor

Changes

  • Adds a SocketAbstraction.SendAsync method for .NET6+ targets.
  • Proves the functionality of the new method by using it in ProtocolVersionExchange.StartAsync.
  • Proves replacing lock in Session with SemaphoreSlim for future async/await work.

Notes
This PR is mostly about preparation for more async/await work and proving some of the techniques.

I made the SocketAbstraction class partial so we could put conditional methods in a separate SocketAbstraction.Async.cs file. Let me know if we like that pattern because I expect a lot more conditional code is coming for other classes.

@WojciechNagorski
Copy link
Collaborator

It looks ok but I need to test it and check a few things.

@Rob-Hague

This comment was marked as off-topic.

@WojciechNagorski WojciechNagorski self-assigned this Jan 7, 2024
@WojciechNagorski WojciechNagorski merged commit 48a8fe6 into sshnet:develop Jan 25, 2024
1 check passed
@WojciechNagorski
Copy link
Collaborator

LGTM! sorry for the delay.

@WojciechNagorski
Copy link
Collaborator

@jacobslusser I hope this delay hasn't discouraged you. Next time I'll try to deal with your PR right away.

@jacobslusser
Copy link
Contributor Author

@jacobslusser I hope this delay hasn't discouraged you. Next time I'll try to deal with your PR right away.

All good. 😄

@WojciechNagorski
Copy link
Collaborator

This issue has been fixed in the 2024.0.0 version.

@WojciechNagorski WojciechNagorski added this to the 2024.0.0 milestone Feb 22, 2024
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.

4 participants