max_packet_size is a parameter#2
Merged
scottchiefbaker merged 5 commits intoscottchiefbaker:mainfrom Oct 2, 2024
Merged
Conversation
Closed
| this->_server = server; | ||
| this->_port = port; | ||
| this->_max_buffer_size = max_buffer_size; | ||
| this->_max_packet_size = max_packet_size; |
Owner
There was a problem hiding this comment.
Can we make sure the right side lines up the rest of the lines using spaces?
| // This is a unit8 instead of a char because that's what udp.write() wants | ||
| uint8_t buffer[_max_buffer_size+OVERHEAD_PACKET_SIZE]; | ||
| int len = snprintf((char*)buffer, _max_buffer_size+OVERHEAD_PACKET_SIZE, "<%d>%s %s: %s", priority, _hostname, _app, buf); | ||
| uint8_t buffer[_max_packet_size+OVERHEAD_PACKET_SIZE]; |
Owner
There was a problem hiding this comment.
I think we need to remove OVERHEAD_PACKET_SIZE here right?
Owner
|
This looks good save for two little things I mentioned above in comments. If you fix those I'll land this. |
update version
Owner
|
This looks good and compiles for me. I'm going to land it and then make some minor whitespace fixes. |
Owner
|
I also dropped the default packet size back to 128 so we're consistent with what we had before. I think 128 should be plenty for most use cases, and it saves a bit of RAM. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.