NetworkExtension NWEndpoint construct

Hi there,

With Network NWEndpoint, I can construct it like below.
Code Block
let proxyEp = Network.NWEndpoint.hostPort(host: Network.NWEndpoint.Host("127.0.0.1"), port: Network.NWEndpoint.Port("8888")!)

But how about constructing a NetworkExtension NWEndpoint? Do I have to use NWHostEndpoint?

Thanks in advance for any suggestion.

Do I have to use NWHostEndpoint?

Yes. For example:

Code Block
let ep = NWHostEndpoint(hostname: "example.com", port: "80")


Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"
NetworkExtension NWEndpoint construct
 
 
Q