Jump To:
Leopard Sample Code
Networking capabilities in Mac OS X include support for the major protocols and services. Developers can gain access to them through sockets and Core Services, as well as through the higher-level Carbon and Cocoa APIs.

Provides a guided introduction to developing network-capable applications for Mac OS X.   Essential information for developers using Apple's networking environment.   API references organized by framework.
Document Descriptions
On Off
Display

Sorted by
Title
Sort by
Topic
Sort by
Date
AutoUpdater (HTML) (DMG) (ZIP)
This sample demonstrates Cocoa networking using the NSURL loading classes, NSURLConnection and NSURLDownload.
Cocoa 2005-06-01
BSDLLCTest (HTML) (DMG) (ZIP)
Program sample demonstrates how to send and receive raw LLC Ethernet packets.
Carbon, Hardware & Drivers 2003-06-12
CFFTPSample (HTML) (DMG) (ZIP)
A simple example showing how to use CFFTPStream to download and upload files.
Core Foundation 2006-10-13
CFHostSample (HTML) (DMG) (ZIP)
Uses the CFHost API to do DNS hostname lookups and to determine host reachability.
Carbon, Core Foundation 2004-04-20
CFNetworkHTTPDownload (HTML) (DMG) (ZIP)
Demonstrates how to download a URL using CFNetworking.
Carbon, Core Foundation 2006-01-18
CFProxySupportTool (HTML) (DMG) (ZIP)
Shows how to use the CFProxySupport APIs to decide whether a network connection should pass through a proxy.
Core Foundation, Darwin 2007-10-29
CocoaHTTPServer (HTML) (DMG) (ZIP)
A Cocoa example showing how to write a very basic HTTP service.
Cocoa 2005-06-01
CryptNoMore (HTML) (DMG) (ZIP)
Shows how to authenticate a user using Open Directory (Directory Services).
Security 2008-03-17
DNSServiceMetaQuery (HTML) (DMG) (ZIP)
Shows how to discover Bonjour service types being advertised on the local network.
Bonjour, Core Foundation, Darwin 2005-06-01
DockBrowser (HTML) (DMG) (ZIP)
Demonstrates how to use CFNetServices to take advantage of Bonjour service discovery and name resolution.
Bonjour 2005-02-08
enetlognke (HTML) (DMG) (ZIP)
Interface filter based on supported Kernel Programming Interfaces for Tiger.
Hardware & Drivers 2005-08-10
GetHWEthernetAddr (HTML) (DMG) (ZIP)
Deprecated - Shows how to obtain the hardware Ethernet address of a machine.
Hardware & Drivers 2003-01-14
GetMACAddressSample (HTML) (DMG) (ZIP)
Demonstrates how to retrieve the MAC address for each Ethernet interface from the Mac OS X I/O Registry.
Darwin, Mac OS X Server, Security 2003-01-14
GetPrimaryMACAddress (HTML) (DMG) (ZIP)
Demonstrates retrieving the MAC address of the built-in Ethernet controller. Useful for uniquely identifying a Macintosh system.
Darwin, Mac OS X Server, Security 2005-10-27
GetSetOptions (HTML) (DMG) (ZIP)
Demonstrates a variety of uses of Open Transport's option management routines.
Carbon, Hardware & Drivers, Mac OS X Server 2003-01-14
GridCalendar (HTML) (DMG) (ZIP)
Demonstrates how to add a custom job submission UI to the GridSample project.
Cocoa 2005-06-01
IdentitySample (HTML) (DMG) (ZIP)
IdentitySample builds a utility which demonstrates how to use the CoreServices Identity API to manage system-wide identities
Core Foundation 2006-07-27
ImageClient (HTML) (DMG) (ZIP)
Demonstrates how to use CFNetwork for synchronous and asynchronous operations, network diagnostics, proxy navigation, and authentication.
Carbon, Cocoa, Core Foundation 2005-06-01
Kerberos GSS (HTML) (DMG) (ZIP)
Kerberos GSS-API Sample
Security 2008-06-04
ListMania (HTML) (DMG) (ZIP)
Demonstrates a variety of techniques for using Open Transport's list utility routines.
Carbon, Hardware & Drivers 2003-01-14
LocalServer (HTML) (DMG) (ZIP)
Deprecated - Sample demonstrates how a Classic process can communicate with a Mac OS X process using IP networking protocols.
Carbon 2003-01-30
LSMSmartCategorizer (HTML) (DMG) (ZIP)
Demonstrates the Latent Semantic Mapping (LSM) framework by automatically categorize RSS feeds.
Internet & Web 2007-05-09
MoreIsBetter (HTML) (DMG) (ZIP)
Library providing indispensable wrapers and workarounds for many areas of Mac OS programming.
Carbon, Darwin, Security 2003-10-27
MoreSCF (HTML) (DMG) (ZIP)
High-level wrapper around System Configuration framework, making common operations easy.
Darwin 2007-06-07
NameAndAddress (HTML) (DMG) (ZIP)
A single window utility that gets a host name from an IP address or an IP address from a hostname.
Cocoa 2003-01-14
NewsReader (HTML) (DMG) (ZIP)
Demonstrates use of the Publication Subscription framework to create a simple RSS reader application.
Cocoa, Internet & Web 2007-06-01
NoCopyReceives (HTML) (DMG) (ZIP)
Demonstrates using no-copy receives under Open Transport.
Carbon, Hardware & Drivers, Internet & Web 2003-01-14
NSLMiniBrowser (HTML) (DMG) (ZIP)
Deprecated - Uses the NSL API to find network services using SLP, NBP, and Directory Services.
Carbon 2003-01-14
OT Virtual Server (HTML) (DMG) (ZIP)
Deprecated - Sample code which uses Open Transport and demonstrates real world issues.
Carbon 2003-01-14
OTEndpointInfo (HTML) (DMG) (ZIP)
Deprecated - Demonstrates how to query an endpoint for its 'vital statistic' using OTGetEndpointInfo.
Carbon 2003-08-20
OTLookupNameTest (HTML) (DMG) (ZIP)
Deprecated - Demonstrates how to lookup NBP entities on an AppleTalk network using Open Transport.
Carbon 2003-01-14
OTMP (HTML) (DMG) (ZIP)
Deprecated - A library for calling Open Transport synchronously from preemptively scheduled tasks (MP tasks).
Carbon 2003-07-22
OTPingSample (HTML) (DMG) (ZIP)
Deprecated - Demonstrates how to implement ping on top of the Open Transport API.
Carbon 2003-07-22
PictureSharing (HTML) (DMG) (ZIP)
Demonstrates how to use NSNetServices to advertise a service using Bonjour.
Bonjour 2005-02-08
PictureSharingBrowser (HTML) (DMG) (ZIP)
Demonstrates how to use NSNetServices to take advantage of Bonjour service discovery and name resolution.
Bonjour 2005-02-08
PortMapper (HTML) (DMG) (ZIP)
Demonstrates Bonjour's NAT port-mapping API, and provides a higher-level Objective-C interface to it.
Bonjour 2008-07-25
QISA (HTML) (DMG) (ZIP)
Demonstrates the basics of writing an Internet setup assistant for traditional Mac OS and Mac OS X.
Carbon, Darwin 2003-05-15
SimpleDial (HTML) (DMG) (ZIP)
Demonstrates management of dialup connections, such as PPP, using System Configuration framework network connection API.
Core Foundation, Darwin 2005-07-26
SimplePing (HTML) (DMG) (ZIP)
Sample provides simple API to programatically ping a remote host without admin privileges
Darwin, Internet & Web 2003-10-27
SimpleReach (HTML) (DMG) (ZIP)
Demonstrates network host reachability testing using the System Configuration framework asynchronous network reachability API.
Core Foundation, Darwin 2005-07-26
SocketCancel (HTML) (DMG) (ZIP)
Shows how to safely cancel threads that are blocked within BSD sockets calls.
Darwin 2005-08-10
tcplognke (HTML) (DMG) (ZIP)
Demonstrates a TCP socket filter based on supported Kernel Programming Interfaces for Tiger
Hardware & Drivers 2006-11-27
URL CacheInfo (HTML) (DMG) (ZIP)
Demonstrates resource caching behavior using the Cocoa URL loading system.
Cocoa, Internet & Web 2008-06-05