webSocketTask(with:)
Creates a WebSocket task for the provided URL.
Declaration
func webSocketTask(with url: URL) -> URLSessionWebSocketTaskParameters
- url:
The WebSocket URL with which to connect.
Discussion
The provided URL must have a ws or wss scheme.