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

feat: add is_opened flag to socket base class #68

Merged
merged 8 commits into from
Oct 6, 2023
Merged

Conversation

domire8
Copy link
Member

@domire8 domire8 commented Oct 2, 2023

Description

This PR solves the issue by applying to proposed change in the parent topic to the base class, with one difference: the receive/send function throw an exception if the socket hasn't been opened. Otherwise it might be really hard to understand if it failed because there is no connection or because it was not opened.

Quite a big PR because this required changes in all derived socket classes and I updated the tests quite a bit.

Review guidelines

Estimated Time of Review: 15 minutes
Review by commit possible

Checklist before merging:

  • Confirm that the relevant changelog(s) are up-to-date in case of any user-facing changes

Copy link
Contributor

@JasperTan97 JasperTan97 left a comment

Choose a reason for hiding this comment

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

Builds fine for me!

@domire8 domire8 linked an issue Oct 3, 2023 that may be closed by this pull request
Copy link
Member

@eeberhard eeberhard left a comment

Choose a reason for hiding this comment

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

Great work! An elegant solution. Thanks for also updating the tests

@domire8 domire8 merged commit d0c5ef7 into main Oct 6, 2023
3 checks passed
@domire8 domire8 deleted the feature/is-open branch October 6, 2023 07:12
@domire8 domire8 mentioned this pull request Apr 30, 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.

Notify if open() has not been called
3 participants