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

Servers: Common implementation for both TCP and UDP servers #322

Merged

Conversation

francis-clairicia
Copy link
Owner

@francis-clairicia francis-clairicia commented Jul 7, 2024

Backward-incompatible changes

  • Removed get_addresses() from AbstractNetworkServer and AbstractAsyncNetworkServer
  • Removed stop_listening() from StandaloneTCPNetworkServer and AsyncTCPNetworkServer
    • server_close() must be used from now on
  • server_close() no longer shut down the serve_forever() loop directly like shutdown()

New feature

  • Asynchronous servers ONLY :
    • Added server_activate() method to add the possibility to bind and activate listeners before calling serve_forever()
    • Added is_listening() to check if server_activate() has already been called

@francis-clairicia francis-clairicia added topic-server Relative to server implementations breaking-changes Backward-incompatible changes labels Jul 7, 2024
@francis-clairicia francis-clairicia self-assigned this Jul 7, 2024
Copy link

codecov bot commented Jul 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (a5671c7) to head (be2fc00).

Additional details and impacted files
Flag Coverage Δ
OS-Linux 99.89% <100.00%> (-0.01%) ⬇️
OS-Windows 99.78% <99.53%> (-0.01%) ⬇️
OS-macOS 99.89% <100.00%> (-0.01%) ⬇️
Py-3.11 99.89% <100.00%> (-0.01%) ⬇️
Py-3.12 99.94% <100.00%> (-0.01%) ⬇️
test-functional 82.30% <100.00%> (-0.11%) ⬇️
test-unit 89.62% <49.53%> (+0.75%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

…close() blocking if serve_forever() is running
@francis-clairicia francis-clairicia added the pr-skip-test Indicator to skip unit tests for pull requests label Jul 7, 2024
@francis-clairicia francis-clairicia removed the pr-skip-test Indicator to skip unit tests for pull requests label Jul 7, 2024
@francis-clairicia francis-clairicia merged commit 6bc26f8 into main Jul 7, 2024
8 checks passed
@francis-clairicia francis-clairicia deleted the feature/servers/common-server-implementation branch July 7, 2024 10:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-changes Backward-incompatible changes topic-server Relative to server implementations
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant