TechnologiesNetworking & Connectivity

CFNetwork

iOSmacOStvOSwatchOSvisionOS

CFNetwork provides low-level Core Foundation networking built on streams, giving you direct control over HTTP and FTP communication, host resolution, sockets, proxy support, and network service discovery. Construct and parse requests and responses with CFHTTPMessage, handle credentials through CFHTTPAuthentication, and resolve names and addresses using CFHost and CFHostInfoType. Publish, browse, and monitor Bonjour-style services with CFNetService, CFNetServiceBrowser, and CFNetServiceMonitor, and diagnose connectivity problems through CFNetDiagnostic. Errors surface through enumerations such as CFNetworkErrors, CFStreamErrorHTTP, and CFNetServicesError.

HTTP Messages and Authentication 2

Construct, parse, and authenticate HTTP requests and responses at the Core Foundation level.

  • Cl
    CFHTTPMessage
    An object that represents an HTTP request or response message you can build, parse, and serialize.
  • Cl
    CFHTTPAuthentication
    An object that encapsulates HTTP authentication information for applying credentials to requests.

Host Resolution 3

Resolve host names and addresses and receive resolution callbacks.

  • Cl
    CFHost
    An object that resolves a host's names, addresses, and reachability information.
  • St
    CFHostClientContext
    A structure that holds client information passed to a CFHost resolution callback.
  • En
    CFHostInfoType
    Constants that specify the kind of host information to resolve, such as addresses or names.

Network Service Discovery 7

Publish, browse, and monitor Bonjour-style network services.

  • Cl
    CFNetService
    An object that represents a discoverable network service that can be published or resolved.
  • Cl
    CFNetServiceBrowser
    An object that browses the network for available services of a given type.
  • Cl
    CFNetServiceMonitor
    An object that monitors a network service for changes to its associated records.
  • St
    CFNetServiceClientContext
    A structure that holds client information passed to network service callbacks.
  • St
    CFNetServiceRegisterFlags
    Flags that control how a network service is registered for publication.
  • St
    CFNetServiceBrowserFlags
    Flags that describe the results returned while browsing for network services.
  • En
    CFNetServiceMonitorType
    Constants that specify which type of record a network service monitor observes.

Connectivity Diagnostics 2

Diagnose and report network connectivity problems.

  • Cl
    CFNetDiagnostic
    An object that diagnoses network connectivity problems and reports their status.
  • En
    CFNetDiagnosticStatusValues
    Constants that describe the connectivity status reported by a network diagnostic.

Errors 4

Error codes reported by CFNetwork's HTTP, service, and stream operations.

  • En
    CFNetworkErrors
    Constants that identify errors returned by CFNetwork operations.
  • En
    CFStreamErrorHTTP
    Constants that identify HTTP stream error conditions.
  • En
    CFStreamErrorHTTPAuthentication
    Constants that identify errors encountered during HTTP authentication.
  • En
    CFNetServicesError
    Constants that identify errors returned by network service discovery operations.

Type Aliases 6

  • Ty
    CFHostClientCallBack
  • Ty
    CFNetDiagnosticStatus
  • Ty
    CFNetServiceClientCallBack
  • Ty
    CFNetServiceMonitorClientCallBack
  • Ty
    CFNetServiceBrowserClientCallBack
  • Ty
    CFProxyAutoConfigurationResultCallback
← Networking & Connectivity