Super class: NSURLSessionTaskMBS
|class||Cocoa Networking||MBS MacFrameworks Plugin||20.2||✅ Yes||❌ No||❌ No||✅ Yes||All|
NSURLSessionStreamTaskMBS is a concrete subclass of NSURLSessionTaskMBS. Many of the methods in the NSURLSessionStreamTaskMBS class are documented in NSURLSessionTaskMBS.
The NSURLSessionStreamTaskMBS class provides an interface a TCP/IP connection created via NSURLSession. Tasks may be created from an NSURLSession using the streamTaskWithHostName and streamTaskWithNetService methods. They may also created as a result of an NSURLSessionDataTaskMBS being upgraded via the HTTP Upgrade: response header and appropriate use of the HTTPShouldUsePipelining option of NSURLSessionConfigurationMBS.
See RFC 2817 and RFC 6455 for information about the Upgrade: header.
An NSURLSessionStreamTask object perform sasynchronous reads and writes, which are enqueued and executed serially, calling a handler upon completion being on the session delegate queue. If the task is canceled, all enqueued reads and writes will call their completion handlers with an appropriate error.
When working with APIs that accept NSStreamMBS objects, you can create NSInputStreamMBS and NSOutputStreamMBS objects from an NSURLSessionStreamTaskMBS object by calling the captureStreams method.
Subclass of the NSURLSessionTaskMBS class.
This is an abstract class. You can't create an instance, but you can get one from various plugin functions.
- 7 methods
- method captureStreams
- method closeRead
- method closeWrite
- method Constructor
- method readData(minBytes as Integer, maxBytes as Integer, timeout as Double, Handler as NSURLSessionStreamTaskReadDataCompletedMBS, tag as variant = nil)
- method startSecureConnection
- method writeData(data as MemoryBlock, timeout as Double, Handler as NSURLSessionStreamTaskWriteDataCompletedMBS, tag as variant = nil)
- 2 delegates
Super class NSURLSessionTaskMBS
- 17 properties
- property countOfBytesClientExpectsToReceive as Int64
- property countOfBytesClientExpectsToSend as Int64
- property countOfBytesExpectedToReceive as Int64
- property countOfBytesExpectedToSend as Int64
- property countOfBytesReceived as Int64
- property countOfBytesSent as Int64
- property currentRequest as NSURLRequestMBS
- property earliestBeginDate as Date
- property earliestBeginDateTime as DateTime
- property error as NSErrorMBS
- property Handle as Integer
- property originalRequest as NSURLRequestMBS
- property Priority as Single
- property response as NSURLResponseMBS
- property state as Integer
- property taskDescription as String
- property taskIdentifier as UInt64
- 5 methods
- 4 shared methods
- 4 constants
The task has received a cancel message.
The delegate may or may not have received a taskDidCompleteWithError message yet. A task in this state is not subject to timeouts.
The task has completed (without being canceled), and the task's delegate receives no further callbacks.
If the task completed successfully, the task’s error property is nil. Otherwise, it provides an error object that tells what went wrong. A task in this state is not subject to timeouts.
The task is currently being serviced by the session.
A task in this state is subject to the request and resource timeouts specified in the session configuration object.
The task was suspended by the app.
No further processing takes place until the task is resumed. A task in this state is not subject to timeouts.
This class has no sub classes.
Some methods using this class:
- NSURLSessionMBS.streamTaskWithHostName(hostname as String, Port as Integer) as NSURLSessionStreamTaskMBS
Some events using this class:
- NSURLSessionMBS.dataTaskDidBecomeStreamTask(dataTask as NSURLSessionDataTaskMBS, downloadTask as NSURLSessionStreamTaskMBS)
- NSURLSessionMBS.streamTaskBetterRouteDiscoveredForStreamTask(streamTask as NSURLSessionStreamTaskMBS)
- NSURLSessionMBS.streamTaskDidBecomeInputStream(streamTask as NSURLSessionStreamTaskMBS, inputStream as NSInputStreamMBS, outputStream as NSOutputStreamMBS)
- NSURLSessionMBS.streamTaskReadClosedForStreamTask(streamTask as NSURLSessionStreamTaskMBS)
- NSURLSessionMBS.streamTaskWriteClosedForStreamTask(streamTask as NSURLSessionStreamTaskMBS)
Some examples using this class:
The items on this page are in the following plugins: MBS MacFrameworks Plugin.
MBS FileMaker Plugins