Instance Method インスタンスメソッド

urlSession(_:betterRouteDiscoveredFor:)

Tells the delegate that a better route to the host has been detected for the stream. 委任先に、ホストへのより良いルートがストリームに対して検出されたことを伝えます。

Declaration 宣言

optional func urlSession(_ session: URLSession, 
betterRouteDiscoveredFor streamTask: URLSessionStreamTask)

Parameters パラメータ

session

The session of the stream task that discovered a better route. より良いルートを発見したストリームタスク、のセッション。

streamTask

The stream task that discovered a better route. より良いルートを発見したストリームタスク。

Discussion 議論

This method is called when the URL loading system determines that a better route to the endpoint host is available. For example, this method may be called when a Wi-Fi interface becomes available. このメソッドは、URLローディングシステムが、エンドポイントホストへのより良いルートが利用可能であることを突き止める時に呼び出されます。例えば、このメソッドは、あるWi-Fiインターフェイスが利用可能になる場合に呼び出されるかもしれません。

You should consider completing pending work and creating a new stream task in order to take advantage of better routes when they become available. あなたは、未解決の仕事を完了することそして新しいストリーム他タスクを作成することを考慮すべきです、より良いルートそれらをそれらが利用可能になる時に活用するために。