DarwinWebSocketClient

class DarwinWebSocketClient(sessionConfig: <Error class: unknown class> = NSURLSessionConfiguration.defaultSessionConfiguration(), maximumMessageSize: Long? = null)(source)

An implementation of WebSocketClient using darwin's native NSURLSessionWebSocketTask. This is only available is iOS 13.0+, tvOS 13.0+, watchOS 6.0+, macOS 10.15+ (see documentation)

A custom sessionConfig can be passed to customize the behaviour of the connection. Also, if a non-null maximumMessageSize if provided, it will be used to configure the web socket.

Constructors

Link copied to clipboard
constructor(sessionConfig: <Error class: unknown class> = NSURLSessionConfiguration.defaultSessionConfiguration(), maximumMessageSize: Long? = null)

Properties

Link copied to clipboard

Functions

Link copied to clipboard
open suspend fun connect(url: String, protocols: List<String>, headers: Map<String, String>): <Error class: unknown class>