Editar

Compartilhar via


Network Namespace

Modern networking library.

Classes

NWAdvertiseDescriptor
NWConnection
NWContentContext
NWEndpoint
NWError
NWErrorDomainExtensions
NWInterface
NWListener
NWParameters
NWPath
NWPathMonitor
NWProtocolDefinition
NWProtocolMetadata
NWProtocolOptions
NWProtocolStack

Enums

NWConnectionState
NWEndpointType
NWErrorDomain
NWInterfaceType
NWIPEcnFlag
NWIPVersion
NWListenerState
NWMultiPathService
NWParametersExpiredDnsBehavior
NWPathStatus
NWServiceClass

Delegates

NWConnectionReceiveCompletion
NWConnectionReceiveDispatchDataCompletion
NWListener.AdvertisedEndpointChanged

Remarks

The Network framework is an advanced alterantive to Sockets as made avaialble under System.Net.Sockets which is suitable for use in mobile application with demanding network capabilities.   The framework is designed to solve these problems:

  • Establishing a connection over different transports, automatically handling hostnames that have both IPV4 and IPV6 addresses, supporting Bonjour connections and Proxy Automatic Configuration (PAC):
  • A callback based approach for performing non-blocking IO.:
  • Easily support for encryption and authentication over your network connections using TLS.:
  • Being mobile friendly, coping with turning on the cellular radio on demand, supporting multi-path connections that can move from one network interface to another and providing a built-in reconnection and connection monitoring service.:

The Network framework also features a modern architecture that makes it faster than the traditional socket API on Apple platforms.

To create an outgoing network connection, use the T:Network.NWConnection class.

To accept incoming network connections, use the T:Network.NWListener class.