Getting Started with Networking

Mac OS X offers a rich set of networking APIs that provides advanced features while maintaining compatibility with open standards. It supports the dominant media types, protocols, and services in the industry as well as new and innovative services from Apple. You can use Apple's networking APIs to develop software that accomplishes a wide range of networking tasks, from providing access to web services within your application to writing a device driver for a network hardware device.

Start Here

Before you begin to write any code, it’s a good idea to become familiar with the technologies underlying the networking features of Mac OS X. If you haven’t already done so, read:

Choose a Learning Path

If you're developing software that communicates over a network, such as a client application connecting to a server application, you want to be familiar with the different APIs that Mac OS X offers so you can take advantage of network protocols and services. If you're developing applications that will interact with web applications, you need to know how to use Apple's web-based APIs. If you're writing network software for the kernel, you need to understand the Mac OS X software layers. Even though these paths may seem orthogonal, they are not necessarily mutually exclusive.

Developing Client/Server Network Applications

To write an application for Mac OS X that communicates over the network requires the use of protocols and services.

Developing Web-based Applications

For developing applications either to view web content or to develop a web service application, there are a variety of Mac OS X APIs.

  • If your Cocoa application needs to display or edit HTML content, WebKit is ideally suited to assist you. To learn how to use WebKit in your application, read WebKit Objective-C Programming Guide.

  • If you need an interface for accessing web services (such as Amazon.com) in your Cocoa application, you want to use WSDL web services. To learn how to do this, read Web Services Core Programming Guide.

  • If you are looking for more information about creating web content or developing web server applications, read Getting Started with Internet and Web.

Developing In-Kernel Networking Software

To write software in the physical layer to the transport layer of the OSI communications model, you need to interact with the kernel.

  • If you are developing a networking device driver, you need to use the I/O Kit. To learn how to use the I/O Kit for network drivers, read Network Device Driver Programming Guide.

  • If you need to extend or modify the Mac OS X networking infrastructure, use network kernel extensions. To learn, for example, how to implement a custom firewall, read Network Kernel Extensions Programming Guide.

  • If you need to do socket-level network communications from your kernel code, use the Kernel Programming Interface Sockets API. Read kpi_socket.h in the KPI Reference for more information about using sockets in the kernel space.

Next Steps

The Networking Reference Library includes the following high-level resource pages, which you can bookmark for easy access:

  • Guides

    Conceptual and how-to information for networking.

  • Reference

    Focused, detailed descriptions in reference format for networking.

  • Sample Code

    Samples demonstrating how to use APIs and tools.

  • Technical Notes

    Supplemental documents on various networking issues.

  • Release Notes > Networking

    Late-breaking news and highlights of new or changed features in the latest release.

  • Technical Q&As

    Design information and FAQs by Apple’s support engineers.

  • Mailing Lists

    The Macintosh Network Programming mailing list (macnetworkprog) is an excellent place to begin discussing Macintosh network programming. The Mac OS X list (macos-x-server) is for discussing issues relevant to the installation and administration of Mac OS X Server and related technologies. The bonjour-dev mailing list is for discussing Bonjour programming.



© 2008 Apple Inc. All Rights Reserved. (Last updated: 2008-11-19)


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.