Platforms to show: All Mac Windows Linux Cross-Platform

Back to NSURLSessionTaskMBS class.

NSURLSessionTaskMBS.countOfBytesClientExpectsToReceive as Int64

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Networking MBS MacFrameworks Plugin 20.2 ✅ Yes ❌ No ❌ No ✅ Yes All
A best-guess upper bound on the number of bytes the client expects to receive.

The value set for this property should account for the size of both HTTP response headers and the response body. If no value is specified, the system uses -1 instead. This property is used by the system to optimize the scheduling of URL session tasks. Developers are strongly encouraged to provide an approximate upper bound, or an exact byte count, if possible, rather than accept the default.
(Read only property)

NSURLSessionTaskMBS.countOfBytesClientExpectsToSend as Int64

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Networking MBS MacFrameworks Plugin 20.2 ✅ Yes ❌ No ❌ No ✅ Yes All
A best-guess upper bound on the number of bytes the client expects to send.

The value set for this property should account for the size of HTTP headers and body data or body stream. If no value is specified, the system uses -1 instead. This property is used by the system to optimize the scheduling of URL session tasks. Developers are strongly encouraged to provide an approximate upper bound, or an exact byte count, if possible, rather than accept the default.
(Read only property)

NSURLSessionTaskMBS.countOfBytesExpectedToReceive as Int64

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Networking MBS MacFrameworks Plugin 20.2 ✅ Yes ❌ No ❌ No ✅ Yes All
The number of bytes that the task expects to receive in the response body.

This value is determined based on the Content-Length header received from the server. If that header is absent, the value is NSURLSessionTransferSizeUnknown = -1.
(Read only property)

NSURLSessionTaskMBS.countOfBytesExpectedToSend as Int64

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Networking MBS MacFrameworks Plugin 20.2 ✅ Yes ❌ No ❌ No ✅ Yes All
The number of bytes that the task expects to send in the request body.

The URL loading system can determine the length of the upload data in three ways:

  • From the length of the data object provided as the upload body.
  • From the length of the file on disk provided as the upload body of an upload task (not a download task).
  • From the Content-Length in the request object, if you explicitly set it.
Otherwise, the value is NSURLSessionTransferSizeUnknown (-1) if you provided a stream or body data object, or zero (0) if you did not.
(Read only property)

NSURLSessionTaskMBS.countOfBytesReceived as Int64

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Networking MBS MacFrameworks Plugin 20.2 ✅ Yes ❌ No ❌ No ✅ Yes All
The number of bytes that the task has received from the server in the response body.

To be notified when this value changes, implement the dataTaskDidReceiveData event (for data and upload tasks) or the downloadTaskDidWriteData event (for download tasks).
(Read only property)

NSURLSessionTaskMBS.countOfBytesSent as Int64

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Networking MBS MacFrameworks Plugin 20.2 ✅ Yes ❌ No ❌ No ✅ Yes All
The number of bytes that the task has sent to the server in the request body.

This byte count includes only the length of the request body itself, not the request headers.
To be notified when this value changes, implement the taskDidSendBodyData event in your NSURLSessionMBS class.
(Read only property)

NSURLSessionTaskMBS.currentRequest as NSURLRequestMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Networking MBS MacFrameworks Plugin 20.2 ✅ Yes ❌ No ❌ No ✅ Yes All
The URL request object currently being handled by the task.

This value is typically the same as the initial request (originalRequest) except when the server has responded to the initial request with a redirect to a different URL.
(Read only property)

NSURLSessionTaskMBS.earliestBeginDate as Date

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Networking MBS MacFrameworks Plugin 20.2 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
The earliest date at which the network load should begin.

For tasks created from background NSURLSessionMBS instances, this property indicates that the network load should not begin any earlier than this date. Setting this property does not guarantee that the load will begin at the specified date, but only that it will not begin sooner. If not specified, no start delay is used.
This property has no effect for tasks created from nonbackground sessions.
(Read and Write property)

NSURLSessionTaskMBS.earliestBeginDateTime as DateTime

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Networking MBS MacFrameworks Plugin 20.5 ✅ Yes ❌ No ❌ No ✅ Yes All
The earliest date at which the network load should begin.

For tasks created from background NSURLSessionMBS instances, this property indicates that the network load should not begin any earlier than this date. Setting this property does not guarantee that the load will begin at the specified date, but only that it will not begin sooner. If not specified, no start delay is used.
This property has no effect for tasks created from nonbackground sessions.
(Read and Write property)

NSURLSessionTaskMBS.error as NSErrorMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Networking MBS MacFrameworks Plugin 20.2 ✅ Yes ❌ No ❌ No ✅ Yes All
An error object that indicates why the task failed.

This value is nil if the task is still active or if the transfer completed successfully.
(Read only property)

NSURLSessionTaskMBS.Handle as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Networking MBS MacFrameworks Plugin 20.2 ✅ Yes ❌ No ❌ No ✅ Yes All
The internal object reference.

(Read and Write property)

NSURLSessionTaskMBS.originalRequest as NSURLRequestMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Networking MBS MacFrameworks Plugin 20.2 ✅ Yes ❌ No ❌ No ✅ Yes All
The original request object passed when the task was created.

This value is typically the same as the currently active request (currentRequest) except when the server has responded to the initial request with a redirect to a different URL.
(Read only property)

NSURLSessionTaskMBS.Priority as Single

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Networking MBS MacFrameworks Plugin 20.2 ✅ Yes ❌ No ❌ No ✅ Yes All
The relative priority at which you’d like a host to handle the task, specified as a floating point value between 0.0 (lowest priority) and 1.0 (highest priority).

To provide hints to a host on how to prioritize URL session tasks from your app, specify a priority for each task. Specifying a priority provides only a hint and does not guarantee performance. If you don’t specify a priority, a URL session task has a priority of NSURLSessionTaskPriorityDefault, with a value of 0.5.

There are three named priorities you can employ, described in URL Session Task Priority.

You can specify or change a task’s priority at any time, but not all networking protocols respond to changes after a task has started. There is no API to let you determine the effective priority for a task from a host’s perspective.
(Read and Write property)

NSURLSessionTaskMBS.response as NSURLResponseMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Networking MBS MacFrameworks Plugin 20.2 ✅ Yes ❌ No ❌ No ✅ Yes All
The server’s response to the currently active request.

This object provides information about the request as provided by the server. This information always includes the original URL. It may also include an expected length, MIME type information, encoding information, a suggested filename, or a combination of these.
(Read only property)

NSURLSessionTaskMBS.state as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Networking MBS MacFrameworks Plugin 20.2 ✅ Yes ❌ No ❌ No ✅ Yes All
The current state of the task—active, suspended, in the process of being canceled, or completed.

(Read only property)

NSURLSessionTaskMBS.taskDescription as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Networking MBS MacFrameworks Plugin 20.2 ✅ Yes ❌ No ❌ No ✅ Yes All
An app-provided string value for the current task.

The system doesn’t interpret this value; use it for whatever purpose you see fit. For example, you could store a description of the task for debugging purposes, or a key to track the task in your own data structures.
(Read and Write property)

NSURLSessionTaskMBS.taskIdentifier as UInt64

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Networking MBS MacFrameworks Plugin 20.2 ✅ Yes ❌ No ❌ No ✅ Yes All
An identifier uniquely identifying the task within a given session.

This value is unique only within the context of a single session; tasks in other sessions may have the same taskIdentifier value.
(Read only property)

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


The biggest plugin in space...