Network(一)框架概览
文章目录
资源
– Apple Documentation : Network Framework
https://developer.apple.com/documentation/network?language=objc
SDKs 适用范围
- iOS 12.0+
- macOS 10.14+
- Mac Catalyst 13.0+
- tvOS 12.0+
- watchOS 6.0+
Overview
这个框架用来创建网络连接,使用传输和加密协议 来发送和接收数据。
使用这个框架,你可以为你自定义的应用协议 直接访问 TLS, TCP, and UDP 协议。
NSURLSession 也是基于这个框架来实现加载 HTTP- 和基于URL的资源,
Topics
1、Essentials
A local or remote endpoint in a network connection.
An object that stores the protocols to use for connections, options for sending data, and network path constraints.
2、Connections and Listeners
Implementing netcat with Network Framework
Build a simple netcat
tool that establishes network connections and transfers data.
A bidirectional data connection between a local endpoint and a remote endpoint.
An object you use to listen for incoming network connections.
An object you use to browse for available network services.
An object you use to send and receive custom Ethernet frames.
3、Network Protocols
Configure protocol options to use with connections and listeners, and inspect the results of protocol handshakes.
Configure options for connections that use the Transmission Control Protocol.
Configure options for connections that use Transport Layer Security.
Configure options for connections that use the User Datagram Protocol.
Configure Internet Protocol options on connections.
Configure options for connections that use WebSocket.
Create custom protocols to frame applications messages over a connection.
4、Network Security
Configure security options for TLS handshakes.
5、Paths and Interfaces
An object that contains information about the properties of the network that a connection uses, or that are available to your app.
An observer that you use to monitor and react to network changes.
An interface that a network connection uses to send and receive data.
6、Memory Management
Releases a reference count on a Network.framework object.
Adds a reference count to a Network.framework object.
The generic type for objects in the Network framework.
7、Errors
The errors returned by the Network framework.
8、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.
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.
9、Protocols
10、Reference
Access Network framework constants used in C.
Access Network framework functions used in C.