Instance Property

maximumMessageSize

The maximum number of bytes to buffer before the receive call fails with an error.

Declaration

var maximumMessageSize: Int { get set }

Discussion

This value includes the sum of all bytes from continuation frames. Receive calls will fail once the task reaches this limit.

See Also

Sending and Receiving Data

func send(URLSessionWebSocketTask.Message, completionHandler: (Error?) -> Void)

Sends a WebSocket message, receiving the result in a completion handler.

enum URLSessionWebSocketTask.Message

An enumeration of the types of messages sent and received.

func receive(completionHandler: (Result<URLSessionWebSocketTask.Message, Error>) -> Void)

Reads a WebSocket message once all the frames of the message are available.