Swift server in Firewall System Extension

Essentially the error for listener comes from ---


nw_listener_socket_inbox_create_socket bind(3, <private>) tcp, local: ::.12345, indefinite, server failed [1: Operation not permitted]

<<< trying to do local socket on 127.0.0.1 >>>



main.swift or SimpleFirewall extension

let queue = DispatchQueue.global(qos: .background)

queue.async() {

IPCmain()


}


func IPCmain() {

os_log ("<<<<<<<<<<<<<<<<<<<<<< IPCmain starts"). << -- this shows up in console log viewer App

Server.run()

os_log ("<<<<<<<<<<<<<<<<<<<<<< IPCmain ends "). << -- this shows up in console log viewer App

}


When run the same Sever code in a stand-alone cmd line App, it works


Is there something obvious I'm missing ???


Thanks,

Prokash

Swift server in Firewall System Extension
 
 
Q