Platforms to show: All Mac Windows Linux Cross-Platform

Back to NSURLSessionStreamTaskMBS class.

NSURLSessionStreamTaskMBS.captureStreams

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Networking MBS MacFrameworks Plugin 20.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Completes any already enqueued reads and writes, and then invokes the streamTaskDidBecomeInputStream event.

NSURLSessionStreamTaskMBS.closeRead

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Networking MBS MacFrameworks Plugin 20.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Completes any enqueued reads and writes, and then closes the read side of the underlying socket.

You may continue to write data using the writeData method after calling this method. Any calls to readData after calling this method will result in an error.

Some examples using this method:

NSURLSessionStreamTaskMBS.closeWrite

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Networking MBS MacFrameworks Plugin 20.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Completes any enqueued reads and writes, and then closes the write side of the underlying socket.

You may continue to read data using the readDat method after calling this method. Any calls to writeData after calling this method will result in an error.
Because the server may continue to write bytes to the client, it is recommended that you continue reading until the stream reaches end-of-file (EOF).

Some examples using this method:

NSURLSessionStreamTaskMBS.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.

NSURLSessionStreamTaskMBS.readData(minBytes as Integer, maxBytes as Integer, timeout as Double, Handler as NSURLSessionStreamTaskReadDataCompletedMBS, 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
Asynchronously reads a number of bytes from the stream, and calls a handler upon completion.

minBytes: The minimum number of bytes to read.
maxBytes: The maximum number of bytes to read.
timeout: A timeout for reading bytes. If the read is not completed within the specified interval, the read is canceled and the completionHandler is called with an error. Pass 0 to prevent a read from timing out.

Handler: The completion handler to call when all bytes are read, or an error occurs.

NSURLSessionStreamTaskMBS.startSecureConnection

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Networking MBS MacFrameworks Plugin 20.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Completes any enqueued reads and writes, and establishes a secure connection.

Authentication callbacks are sent to the taskDidReceiveChallenge event in NSURLSessionMBS class.

NSURLSessionStreamTaskMBS.writeData(data as MemoryBlock, timeout as Double, Handler as NSURLSessionStreamTaskWriteDataCompletedMBS, 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
Asynchronously writes the specified data to the stream, and calls a handler upon completion.

data: The data to be written.
timeout: A timeout for writing bytes. If the write is not completed within the specified interval, the write is canceled and the completionHandler is called with an error. Pass 0 to prevent a write from timing out.

completionHandler: The completion handler to call when all bytes are written, or an error occurs.

There is no guarantee that the remote side of the stream has received all of the written bytes at the time that completionHandler is called, only that all of the data has been written to the kernel.

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


The biggest plugin in space...