Instance Method


This convenience initializer can be used to create a new session based on the original session’s endpoint and parameters.


- (instancetype)initWithUpgradeForSession:(NWUDPSession *)session;


The caller should watch the hasBetterPath property on an existing NWUDPSession object. When hasBetterPath is YES, the caller should call initWithUpgradeForSession: to create a new session, then start transferring data on the new session as soon as possible to reduce power and and avoid expensive networks. When the new session is ready, the application can start using the new session and tear down the original one.

See Also

Responding to Network Changes


If a session has a better path, new session would use a different interface

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software