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

audio streaming header 関連処理の整理 #189

Merged
merged 5 commits into from
Nov 12, 2024
Merged

Conversation

Hexa
Copy link
Contributor

@Hexa Hexa commented Nov 12, 2024

This pull request includes significant changes to the handler.go and handler_test.go files, primarily focusing on improving the packet reading mechanism and enhancing the test coverage. The changes involve refactoring the packet reading logic to use defined constants for header and payload lengths, and adding comprehensive tests for the new packet reading function.

Refactoring and Improvements:

  • handler.go: Introduced constants HeaderLength and MaxPayloadLength to replace hardcoded values in the packet reading logic, making the code more readable and maintainable. [1] [2] [3]
  • handler.go: Simplified the readPacketWithHeader function to handle packet reading more efficiently and clearly.

Test Enhancements:

  • handler_test.go: Added a new test function TestReadPacketWithHeader to cover various scenarios for the readPacketWithHeader function, ensuring robust test coverage.
  • handler_test.go: Removed redundant test cases for audio streaming headers, as these are now covered by the new test function. [1] [2] [3]

@Hexa Hexa merged commit 3ac7971 into develop Nov 12, 2024
1 check passed
@Hexa Hexa deleted the feature/refactoring branch November 12, 2024 04:12
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