It seems like Martin R’s answer should work, however I was able to get the socket to stay open with a single function call. At the end of the startServer() function, I put the line:
CFRunLoopRun()
Which worked.
It seems like Martin R’s answer should work, however I was able to get the socket to stay open with a single function call. At the end of the startServer() function, I put the line:
CFRunLoopRun()
Which worked.