var request: URLRequest
var response: URLResponse?
Availability 有効性
Technology
class URLSessionTaskTransactionMetrics : NSObject
Each URLSession
object consists of a request
and response
property, corresponding to the request and response of the corresponding task. It also contains temporal metrics, starting with fetch
and ending with response
, as well as other characteristics like network
and resource
.
各URLSession
オブジェクトは、対応しているタスクのリクエストと応答に対応しているrequest
とresponse
プロパティから成ります。それはまた、fetch
で始まりresponse
で終わる、時間的指標を含みます、それだけでなくnetwork
とresource
のような他の特徴も。
Figure 1 shows the sequence of events for a URL session task, which correspond to the temporal metrics captured by URLSession
.
図 1 はあるURLセッションタスクに対する一連のイベントを示します、それらはURLSession
によってキャプチャされた時間的指標に対応します。
For all metrics with a start and end date, if an aspect of the task was not completed, then its corresponding end date metric is nil
. This can happen if name lookup begins, but the operation either times out, fails, or the client cancels the task before the name can be resolved. In this case, the domain
property is nil
, along with all metrics for aspects that occurred afterwards.
開始および終了日付をもつ全ての指標に対して、タスクのある局面が完了しなかったならば、そのときそれの対応する終了日指標はnil
です。これは、名前検索が始まる、しかし演算がタイムアウト、失敗どちらかをする、またはクライアントがタスクをその名前が解決される前に取り消すならばならば起こりえます。その場合には、domain
プロパティは、nil
です、後で発生した局面それらに対する全ての指標と一緒に。
iCloud Private Relay can change the timing and sequence of events for your tasks by sending requests through a set of privacy proxies. All tasks that use iCloud Private Relay set the is
property in their transaction metrics. In this case, the remote
property contains the address of the proxy, and not the origin server.
Tasks to different hosts can reuse the same transport connection, just like how tasks can already share a connection when using HTTP/2. In these cases, a proxied task may not report any secure
or secure
.
var request: URLRequest
var response: URLResponse?
var fetchStartDate : Date?
var domainLookupStartDate : Date?
var domainLookupEndDate : Date?
var connectStartDate : Date?
var secureConnectionStartDate : Date?
var secureConnectionEndDate : Date?
var connectEndDate : Date?
var requestStartDate : Date?
var requestEndDate : Date?
var responseStartDate : Date?
var responseEndDate : Date?
var countOfRequestBodyBytesBeforeEncoding : Int64
var countOfRequestBodyBytesSent : Int64
var countOfRequestHeaderBytesSent : Int64
var countOfResponseBodyBytesAfterDecoding : Int64
var countOfResponseBodyBytesReceived : Int64
var countOfResponseHeaderBytesReceived : Int64
var networkProtocolName : String?
var remoteAddress : String?
var remotePort : Int?
var localAddress : String?
var localPort : Int?
var negotiatedTLSCipherSuite : tls_ciphersuite_t?
var negotiatedTLSProtocolVersion : tls_protocol_version_t?
var isCellular : Bool
var isExpensive : Bool
var isConstrained : Bool
var isProxyConnection : Bool
var isReusedConnection : Bool
var isMultipath : Bool
var resourceFetchType : URLSessionTaskMetrics.ResourceFetchType
enum URLSessionTaskMetrics.ResourceFetchType
class func new() -> Self
var transactionMetrics : [URLSessionTaskTransactionMetrics]
var taskInterval : DateInterval
var redirectCount : Int