Jump To:
Leopard Sample Code: Cocoa
Networking capabilities in Mac OS X include support for the major protocols and services. Developers can use the networking APIs to provide sophisticated LAN, WAN, Internet, and web capabilities in Cocoa applications. These are accessible through sockets and Core Foundation, as well as through the higher-level Cocoa APIs.

View all Networking Sample Code.
Document Descriptions
On Off
Display

Sort by
Title
Sorted by
Date
PortMapper (HTML) (DMG) (ZIP)
Demonstrates Bonjour's NAT port-mapping API, and provides a higher-level Objective-C interface to it.
2008-07-25
URL CacheInfo (HTML) (DMG) (ZIP)
Demonstrates resource caching behavior using the Cocoa URL loading system.
2008-06-05
NewsReader (HTML) (DMG) (ZIP)
Demonstrates use of the Publication Subscription framework to create a simple RSS reader application.
2007-06-01
GetPrimaryMACAddress (HTML) (DMG) (ZIP)
Demonstrates retrieving the MAC address of the built-in Ethernet controller. Useful for uniquely identifying a Macintosh system.
2005-10-27
CocoaSOAP (HTML) (DMG) (ZIP)
Demonstrates implementing a SOAP client and server in Cocoa.
2005-06-06
AutoUpdater (HTML) (DMG) (ZIP)
This sample demonstrates Cocoa networking using the NSURL loading classes, NSURLConnection and NSURLDownload.
2005-06-01
CocoaEcho (HTML) (DMG) (ZIP)
Cocoa example code showing how to write a simple client and server using NSStream.
2005-06-01
CocoaHTTPServer (HTML) (DMG) (ZIP)
A Cocoa example showing how to write a very basic HTTP service.
2005-06-01
GridCalendar (HTML) (DMG) (ZIP)
Demonstrates how to add a custom job submission UI to the GridSample project.
2005-06-01
ImageClient (HTML) (DMG) (ZIP)
Demonstrates how to use CFNetwork for synchronous and asynchronous operations, network diagnostics, proxy navigation, and authentication.
2005-06-01
PictureSharing (HTML) (DMG) (ZIP)
Demonstrates how to use NSNetServices to advertise a service using Bonjour.
2005-02-08
PictureSharingBrowser (HTML) (DMG) (ZIP)
Demonstrates how to use NSNetServices to take advantage of Bonjour service discovery and name resolution.
2005-02-08
TextLinks (HTML) (DMG) (ZIP)
Programmatically creates links to URLs and other objects and handles clicks in non-URL links.
2003-07-29
GetMACAddressSample (HTML) (DMG) (ZIP)
Demonstrates how to retrieve the MAC address for each Ethernet interface from the Mac OS X I/O Registry.
2003-01-14
NameAndAddress (HTML) (DMG) (ZIP)
A single window utility that gets a host name from an IP address or an IP address from a hostname.
2003-01-14