I have been successful at writing Swift code using a NWListener to listen to WebSocket connections on a specific port, but I do not seem to be able to get the path from the URL for creating different types of connections.
For instance, differentiating between ws://127.0.0.1:80/updates and ws://127.0.0.1:80/changes.
I'd like to be able to get the "updates" or "changes" part when I receive the new connection notification.
Having more sample code around WebSockets and how the upgrade process works that would also be great.
Thank you !
Daniel Tapie
I’ve definitely researched stuff like this before and found that Network framework is missing a few bits and pieces in the WebSocket space. I believe we have a bug tracking this specific issue (r. 138806971) but I still think it’s worthwhile you filing your own enhancement request for it.
Please post your bug number, just for the record.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"