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(udp_socket): allow user to set internal socket buffer size #1

Conversation

mojomex
Copy link
Collaborator

@mojomex mojomex commented Sep 3, 2024

PR Type

  • New Feature

Related Links

Description

This PR adds the ability to set the size of SO_RECVBUF in the underlying system's UDP socket used by UdpSocket.
Calling the new setKernelBufferSize(n_bytes) member function of a UdpSocket tries to set the corresponding option in Boost ASIO and returns a bool that indicates if the operation was successful.

Code not actively invoking this feature is unaffected.

Pre-Review Checklist for the PR Author

PR Author should check the checkboxes below when creating the PR.

  • Assign PR to reviewer

Checklist for the PR Reviewer

Reviewers should check the checkboxes below before approval.

  • Commits are properly organized and messages are according to the guideline
  • (Optional) Unit tests have been written for new behavior
  • PR title describes the changes

Post-Review Checklist for the PR Author

PR Author should check the checkboxes below before merging.

  • All open points are addressed and tracked via issues or tickets

CI Checks

  • Build and test for PR: Required to pass before the merge.

Copy link

@knzo25 knzo25 left a comment

Choose a reason for hiding this comment

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

Left some small aesthetics-related comments

@mojomex mojomex force-pushed the feat-set-rmem branch 3 times, most recently from 501ef05 to df82534 Compare September 11, 2024 05:11
@mojomex
Copy link
Collaborator Author

mojomex commented Sep 11, 2024

Sorry for the force-pushes, I was working on different machines that had different case styles of my name, failing DCO.

@mojomex mojomex requested a review from knzo25 September 11, 2024 05:16
Copy link

@knzo25 knzo25 left a comment

Choose a reason for hiding this comment

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

LGTM

@mojomex mojomex merged commit 8a93ae0 into autowarefoundation:mutable-buffer-in-udp-callback Sep 11, 2024
4 checks passed
@mojomex mojomex deleted the feat-set-rmem branch September 11, 2024 06:47
@mojomex mojomex restored the feat-set-rmem branch September 17, 2024 02:33
mojomex added a commit that referenced this pull request Sep 19, 2024
* feat(udp_socket): allow user to set internal socket buffer size

Signed-off-by: Max SCHMELLER <[email protected]>

* chore: fix typo

Co-authored-by: Kenzo Lobos Tsunekawa <[email protected]>
Signed-off-by: Max SCHMELLER <[email protected]>

* chore(udp_socket): fixed include <>/"" and reordered includes

Signed-off-by: Max SCHMELLER <[email protected]>

---------

Signed-off-by: Max SCHMELLER <[email protected]>
Co-authored-by: Kenzo Lobos Tsunekawa <[email protected]>
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