Post

Replies

Boosts

Views

Activity

Launchd daemon and WebSockets
We are developing a launchd daemon that will communicate with a remote server via a WebSocket. On 10.15 we are using the native WebSocket API NSURLSessionWebSocketTask. The daemon opens the WebSocket connection to the remote server and can send a message to the remote server and get a reply back. The problem we are encountering is that the remote server can not send a messages to the daemon over the WebSocket if the server is the one initiating the communications. The daemon never receives those messages.What is really strange is that if we move the exact same code into a Application the WebSocket messages work as expected (i.e. either end can initate communication over the established WebSocket) so I know the remote server is working and it is not a firewall issue.Is there anything special needed to make WebSockets work with a Launchd daemon?
1
0
797
Jun ’20