How to stream web socket with URLSession in Swift

Issue #1055 &#xA; Most HTTP requests follow a simple pattern: send a request, wait for a response, close the connection. WebSocket breaks that pattern. The connection stays open after the handshake, and both sides can push messages at any time without waiting for the other to ask. This makes it well-suited for live updates, chat, or streaming AI responses where the server needs to push data as it…