Platforms to show: All Mac Windows Linux Cross-Platform

Back to NSURLSessionWebSocketTaskMBS class.

NSURLSessionWebSocketTaskMBS.cancel(closeCode as Integer, reason as MemoryBlock)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Networking MBS MacFrameworks Plugin 20.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Sends a close frame with the given closeCode.

An optional reason can be provided while sending the close frame.
Simply calling cancel on the task will result in a cancellation frame being sent without any reason.

NSURLSessionWebSocketTaskMBS.Constructor   Private

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Networking MBS MacFrameworks Plugin 20.2 ✅ Yes ❌ No ❌ No ✅ Yes All
The private constructor.

NSURLSessionWebSocketTaskMBS.receiveMessage(Handler as NSURLSessionWebSocketTaskReceiveMessageCompletedMBS, tag as variant = nil)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Networking MBS MacFrameworks Plugin 20.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Reads a WebSocket message once all the frames of the message are available.

If the maximumMessage size is hit while buffering the frames, the receiveMessage call will error out and all outstanding work will also fail resulting in the end of the task.

Calls handler later when job is done.

NSURLSessionWebSocketTaskMBS.sendMessage(message as NSURLSessionWebSocketMessageMBS, Handler as NSURLSessionWebSocketTaskSendMessageCompletedMBS, tag as variant = nil)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Networking MBS MacFrameworks Plugin 20.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Sends a WebSocket message.

If an error occurs, any outstanding work will also fail.
Note that invocation of the completion handler does not guarantee that the remote side has received all the bytes, only that they have been written to the kernel.

Calls handler on completion.

NSURLSessionWebSocketTaskMBS.sendPing(Handler as NSURLSessionWebSocketTaskSendPingWithPongReceivedMBS, tag as variant = nil)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Networking MBS MacFrameworks Plugin 20.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Sends a ping frame from the client side.

The pongReceiveHandler is invoked when the client receives a pong from the server endpoint.
If a connection is lost or an error occurs before receiving the pong from the endpoint, the handler will be invoked with an error.
Note - the pongReceiveHandler will always be called in the order in which the pings were sent.

The items on this page are in the following plugins: MBS MacFrameworks Plugin.


The biggest plugin in space...