Posts

Post not yet marked as solved
3 Replies
Thank you for reply. I make the NWParameters() like this. let parameters = NWParameters() let privacyContext = NWParameters.PrivacyContext(description: "test") privacyContext.requireEncryptedNameResolution(true, fallbackResolver: .tls(NWEndpoint.hostPort(host: NWEndpoint.Host(host), port: NWEndpoint.Port(rawValue: UInt16(port))!), serverAddresses: [])) parameters.setPrivacyContext(privacyContext) and init bootstrap like this let bootstrap = NIOTSConnectionBootstrap(group: context.eventLoop) .channelInitializer { channel in channel.pipeline.addHandler(MyClientHandler()) } .connect(host: String(host), port: port) But, I am not sure where to apply the parameters and whether I am doing it correctly. If possible, can you show me some example code?