This repository was archived by the owner on Aug 11, 2025. It is now read-only.
feat: Add comprehensive English comments to client package #73
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.
This commit introduces a complete overhaul of the comments in the
clientpackage. The existing code, which lacked detailed documentation, has been annotated with professional, clear, and comprehensive English comments.The primary goal of this change is to improve code readability and maintainability for developers. The new comments adhere to standard Go conventions, explaining the purpose of structs, interfaces, methods, and key logic sections.
Key changes include:
Package and File-level Comments: Added a high-level overview of the
clientpackage.Struct and Interface Documentation: Each struct (
clientImpl,tcpConn,quicAdapter, etc.) and interface (Client,HyUDPConn) now has detailed comments explaining its role and the functionality of its methods.Method and Function Descriptions: Every public and key internal function now has a clear description, including explanations of parameters, return values, and any special behavior (e.g., the custom logic for
FakeTCPinconnectandudpIOImpl).Inline Code Explanations: Complex sections, such as the
quicAdapter's custom framing for UDP messages over TCP, are now fully explained with inline comments to demystify the implementation details.This update significantly enhances the package's documentation, making it much easier for new and existing contributors to understand and work with the codebase.