I had a C socket API question on how to "connect
to an IP address that exists in [two subnets]" and how to choose which one of them to connect to.
I quickly received a helpful (and correct) answer stating that the OS uses a routing table and that this most likely cannot be done programmatically and depends on OS settings.
However, afterward, it was quickly shut down because people could "see absolutely no indication that this question is programming-related", despite the fact that the question had been about how to achieve a clear task programmatically, and that I had already received an answer to this effect, stating that such an API unfortunately does not exist.
Now, obviously, I had no idea beforehand whether this can be done programmatically, or I would have already known the answer to my question.
But people are saying that means the question is off-topic and not even programming-related?
(Presumably if there was such an API, it would render the exact same question on-topic?)
Does this mean users are expected to know the answer to their question already in order to know whether their question is on-topic?
Can someone explain this?
It seems like a pretty clear-cut socket programming question to me.
Edit:
I guess I should have asked this explicitly since no one has addressed this so far, but if you don't think the question belonged on Stack Overflow, then where do you think the appropriate site would have been?