Skip to content

NWEndpoint allows NetService Publisher injection

Compare
Choose a tag to compare
@luizmb luizmb released this 24 Aug 09:10
· 5 commits to master since this release
e65803f

For the sake of tests and also in order to customise the way NetServicePublisher is created (for example, providing a custom timeout for address resolution), the NWEndpoint now asks for a NetServicePublisher factory closure in its init so we can decide how the creating will be. The expected Publisher doesn't have to be NetServicePublisher, just match same Output and Failure, which allow testability by injecting Subjects, for example.