Post not yet marked as solved
Click to stop watching this thread.
You have stopped watching this post. Click to start watching again.
contentPostList.repliesup-voted.tooltip
// Never use the cellular interface
let tcp_params = NWParameters.tcp
tcp_params.prohibitedInterfaceTypes = [.cellular]
if config.useBonjour {
Log.network.notice("Starting NetworkHandler with Bonjour for \(String(describing: config.name), privacy:.public)")
let endpoint = NWEndpoint.service(name: config.name, type: "_cap._tcp", domain: "local", interface: nil)
nwconnection = NWConnection(to: endpoint, using: tcp_params)
}
else {
let host:NWEndpoint.Host = config.host
let port:NWEndpoint.Port = 5055
Log.network.notice("Starting NetworkHandler for \(String(describing: host), privacy:.public) at port: \(String(describing: port), privacy:.public)")
nwconnection = NWConnection(host: host, port: port, using: tcp_params)
}