refraction-networking / water

WebAssembly Transport Executables Runtime
Apache License 2.0
22 stars 1 forks source link

docs: add clarification of RegisterXxx functions and how to enable specific versions of transport module support #38

Closed gaukas closed 6 months ago

gaukas commented 7 months ago

In #37 I realized the lack of documentation on RegisterDialer, RegisterListener, and RegisterRelay is confusing given they are exported functions that were not supposed to be called by a general user(caller).

~Considering moving them into an internal package.~ It was left public and in the root directory to allow third party transport module version support. So add better documentation and optionally move it into another package WITHOUT making it internal is better.

~Also, there's not enough document nor example emphasizing the corresponding version of transport module support (e.g., _ "github.com/gaukas/water/transport/v0") is required. Documentation needed for that.~ Hopefully I did a good job in addressing this part in #39.