You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The type was changed from int to EngineSettingsBuilder.DhtEndPoint, but documentation still assumes it's an int and is confusing (it mentions -1 and 0 magic numbers). Exists on latest master branch.
Edit: The same is true for ListenEndPoints.
Edit2: I just realized you need to put ipv4 or ipv6 in the Key of ListenEndPoints, empty string won't work. Wouldn't it be better to use an enum for Key of ListenEndPoints to avoid mistakes like this?
The text was updated successfully, but these errors were encountered:
ManlyMarco
changed the title
DhtEndPoint xmldocs summary needs to be updated
DhtEndPoint and ListenEndPoint xmldocs summary needs to be updated
Jan 26, 2023
Also, why is EngineSettingsBuilder.ListenEndPoints a dictionary? IPEndPoint knows if its ipv4 or ipv6 right.
There's a mix of a few things going on here
There was a usecase in the past for an external implementation of an ITracker, which then had to be registered with the engine, and so the ability to register an arbitrary uri prefix to a particular ITracker (or ITrackerConnection) implementation was useful.
Consistency across APIs. Trackers can be ipv4 or ipv6, and also UDP or HTTP. As such, the AddressFamily alone isn't enough, they'll need an extra property to disambiguate.
Peer connections can be ipv4 or ipv6 and also TCP or uTP if I ever implement that. Similar to trackers, peer connections would need more than just the IP address.
TBH, I think i'll restructure things similar to what you're both suggesting and not make things overly complex for everyone.
The type was changed from int to
EngineSettingsBuilder.DhtEndPoint
, but documentation still assumes it's an int and is confusing (it mentions -1 and 0 magic numbers). Exists on latest master branch.Edit: The same is true for
ListenEndPoints
.Edit2: I just realized you need to put
ipv4
oripv6
in the Key ofListenEndPoints
, empty string won't work. Wouldn't it be better to use an enum for Key ofListenEndPoints
to avoid mistakes like this?The text was updated successfully, but these errors were encountered: