Introduction to CFNetwork Programming Guide
CFNetwork is a framework in the Core Services framework that provides a library of abstractions for network protocols. These abstractions make it easy to perform a variety of network tasks, such as:
Working with BSD sockets
Creating encrypted connections using SSL or TLS
Resolving DNS hosts
Working with HTTP, authenticating HTTP and HTTPS servers
Working with FTP servers
Publishing, resolving and browsing Bonjour services (described in NSNetServices and CFNetServices Programming Guide)
This book is intended for developers who want to use network protocols in their applications. In order to fully understand this book, the reader should have a good understanding of network programming concepts such as BSD sockets, streams and HTTP protocols. Additionally, the reader should be familiar OS X programming concepts including run loops. For more information about OS X please read Mac Technology Overview.
Organization of This Document
This book contains the following chapters:
CFNetwork Concepts describes each of the CFNetwork APIs and how they interact.
Working with Streams describes how to use the CFStream API to send and receive network data.
Communicating with HTTP Servers describes how to send and receive HTTP messages.
Communicating with Authenticating HTTP Servers describes how to communicate with secure HTTP servers.
Working with FTP Servers describes how to upload and download files from an FTP server, and how to download directory listings.
Using Network Diagnostics describes how to add network diagnostics to your application.
See Also
For more information about the networking APIs in OS X, read:
Getting Started With Networking
Refer to the following reference documents for CFNetwork:
CFFTPStream Reference is the reference documentation for the CFFTPStream API.
CFHTTPMessage Reference is the reference documentation for the CFHTTPMessage API.
CFHTTPStream Reference is the reference documentation for the CFHTTPStream API.
CFHTTPAuthentication Reference is the reference documentation for the CFHTTPAuthentication API.
CFHost Reference is the reference documentation for the CFHost API.
CFNetService Reference is the reference documentation for the CFNetServices API.
CFNetDiagnostics Reference is the reference documentation for the CFNetDiagnostics API.
In addition to the documentation provided by Apple, the following is the reference book for socket-level programming:
UNIX Network Programming, Volume 1 (Stevens, Fenner and Rudoff)
Copyright © 2012 Apple Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2012-06-11