Framework

Network

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

Overview

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

Topics

Essentials

nw_endpoint_t

A local or remote endpoint in a network connection.

nw_parameters_t

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

Connections and Listeners

Implementing netcat with Network Framework

Build a simple netcat tool that establishes network connections and transfers data.

nw_connection_t

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

nw_listener_t

An object you use to listen for incoming network connections.

nw_browser_t

An object you use to browse for available network services.

Beta
nw_ethernet_channel_t

An object you use to send and receive custom Ethernet frames.

Beta

Network Protocols

Configure protocol options to use with connections and listeners, and inspect the results of protocol handshakes.

TCP Options

Configure options for connections that use the Transmission Control Protocol.

TLS Options

Configure options for connections that use Transport Layer Security.

UDP Options

Configure options for connections that use the User Datagram Protocol.

IP Options

Configure Internet Protocol options on connections.

WebSocket Options

Configure options for connections that use WebSocket.

Framer Protocol Options

Create custom protocols to frame applications messages over a connection.

Network Security

Security Options

Configure security options for TLS handshakes.

Paths and Interfaces

nw_path_t

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

nw_path_monitor_t

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

nw_interface_t

An interface that a network connection uses to send and receive data.

Memory Management

nw_release

Releases a reference count on a Network.framework object.

nw_retain

Adds a reference count to a Network.framework object.

nw_object_t

The generic type for objects in the Network framework.

Errors

nw_error_t

The errors returned by the Network framework.

Network Debugging

Choosing a Network Debugging Tool

Decide which tool works best for your network debugging problem.

Debugging HTTP Server-Side Errors

Understand HTTP server-side errors and how to debug them.

Debugging HTTPS Problems with CFNetwork Diagnostic Logging

Use CFNetwork diagnostic logging to investigate HTTP and HTTPS problems.

Recording a Packet Trace

Learn how to record a low-level trace of network traffic.

Taking Advantage of Third-Party Network Debugging Tools

Learn about the available third-party network debugging tools.

Reference

Network Constants

Access Network framework constants used in C.

Network Functions

Access Network framework functions used in C.

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