On Aug 7, 2021, at 2:15 PM, Tom Most email@example.com wrote:
This one seems less clear-cut to me. I think that you could use connectTCP through and endpoint like IHostnameEndpoint and they'd always be passed.
Perhaps optional parameters are usually not a good idea for interfaces? I'm thinking of IAgent.request , where the optionality of the headers parameter leads to a lot of similar-looking conditional code in every implementer. Best to hoist that logic to a top-level facade (e.g., Treq).
I agree with the general point about optionality, but I would say that a zillion clients would break with your implementation if you required bindAddress and timeout, so in this case let's just make IReactorTCP reflect actual reality.