Create network connections to send and receive data using transport and security protocols.


Use this framework when you need direct access to protocols like TLS, TCP, and UDP for your custom application protocols. Continue to use URLSession, which is built upon this framework, for loading HTTP- and URL-based resources.


Connections and Listeners

class NWConnection

A bidirectional data connection between a local endpoint and a remote endpoint.

class NWListener

An object you use to listen for incoming network connections.

enum NWEndpoint

An endpoint in a network connection.

class NWParameters

An object that stores the protocols to use for connections, options for sending data, and network path constraints.

Paths and Monitors

struct NWPath

An object that contains information about the properties of the network used by a connection, or that are available to your app.

class NWPathMonitor

An observer that you use to monitor and react to network changes.

Network Interfaces

struct NWInterface

A network interface used by a network connection to send and receive data.

Network Protocols

Types that define the identity of a protocol, the options to use at setup time, and the available dynamic properties.

class NWProtocol

The abstract superclass used by Network framework protocols and by custom network protocols that you define.

class NWProtocolDefinition

The abstract superclass for identifying a network protocol.

class NWProtocolMetadata

The abstract superclass for specifying metadata about a network protocol.

class NWProtocolOptions

The abstract superclass for configuring the options of a network protocol.

class NWProtocolIP

A network protocol you use for connections that use the Internet Protocol.

class NWProtocolTCP

A network protocol you use for connections that use the Transmission Control Protocol.

class NWProtocolUDP

A network protocol you use for connections that use the User Datagram Protocol.

class NWProtocolTLS

A network protocol you use for connections that use the Transport Layer Security protocol.


enum NWError

The errors thrown by the Network framework.

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