jpdillingham / Soulseek.NET

A .NET Standard client library for the Soulseek network.
GNU General Public License v3.0
173 stars 24 forks source link

SearchResponseResolver doesn't allow an IPEndPoint to be specified #789

Closed jpdillingham closed 10 months ago

jpdillingham commented 10 months ago

Creating this issue preemptively to capture the rationale behind this choice.

Search requests that come directly from the server or from the distributed network don't have an associated IPEndPoint. Only search requests that come directly from a user do.

For this reason it doesn't make sense to pass an IPEndPoint argument to the resolver because it will be null 99.999% of the time, and because including it (even marked nullable) would be a breaking change.

I'm marking this wontfix to hopefully keep myself from investigating this again and coming to the same conclusion. If anyone can make a convincing case for why this is useful, I'll reconsider.

jpdillingham commented 7 months ago

This check should be done client side, and a user endpoint cache should be used to avoid a double-fetch when resolving the user's address to send the results.