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

Refactor transport layer #279

Merged
merged 26 commits into from
Nov 15, 2023
Merged

Conversation

jean-roland
Copy link
Contributor

@jean-roland jean-roland commented Nov 13, 2023

Transport layer refactor to improve maintainability and modularity in prevision of adding a new transport.

Instead of compile-time specific code removal spread everywhere, files call functions that are swapped to dummy versions when the feature is removed.

This may increase slightly code size when removing the feature but makes it much easier to expand the number of transports.

  • added a few "early return" pattern here and there

Copy link
Member

@cguimaraes cguimaraes left a comment

Choose a reason for hiding this comment

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

If possible avoid the early returns, unless they are really needed.
If you still keep them, document them (including the reason).

include/zenoh-pico/transport/multicast/lease.h Outdated Show resolved Hide resolved
include/zenoh-pico/transport/multicast/lease.h Outdated Show resolved Hide resolved
include/zenoh-pico/transport/multicast/read.h Outdated Show resolved Hide resolved
include/zenoh-pico/transport/multicast/read.h Outdated Show resolved Hide resolved
include/zenoh-pico/transport/unicast/lease.h Outdated Show resolved Hide resolved
src/transport/unicast/lease.c Outdated Show resolved Hide resolved
src/transport/unicast/read.c Outdated Show resolved Hide resolved
src/transport/unicast/read.c Outdated Show resolved Hide resolved
src/transport/unicast/read.c Outdated Show resolved Hide resolved
src/transport/unicast/read.c Outdated Show resolved Hide resolved
src/session/scout.c Outdated Show resolved Hide resolved
@Mallets Mallets merged commit e420029 into eclipse-zenoh:master Nov 15, 2023
46 checks passed
@jean-roland jean-roland deleted the rfct_transport branch November 15, 2023 10:26
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.

3 participants