planetarium / libplanet

Blockchain in C#/.NET for on-chain, decentralized gaming
https://docs.libplanet.io/
GNU Lesser General Public License v2.1
506 stars 142 forks source link

Make port option non-nullable #2251

Open greymistcube opened 2 years ago

greymistcube commented 2 years ago

I'd say using zero port by default to signal port binding will happen dynamically to a freely available port is pretty standard.

From what I gather, from a lower level network specification standpoint, zero port is reserved and not specifically used for anything.[^1] Many socket related APIs thus simply use zero port as a "wildcard" port. As we aren't really in raw socket programming business, and NetMQ also follows this convention, we might as well. See this GRC page for more info. 😗

[^1]: I didn't survey the direct source material, but secondary sources mention zero port is reserved and its use is not specified neither by IETF nor IANA. From what I gather, reserved is different from unassigned in the sense that a reserved port is not to be used.

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions.

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions.