Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Networking With Open Transport / Part 1 - Open Transport Essentials


Chapter 2 - Getting Started With Open Transport

This chapter introduces the basic information needed to use Open Transport. If you are writing an application or stand-alone code resource that calls Open Transport functions, you must read the appropriate sections in this chapter to find out how you initialize and close Open Transport, how you configure providers, and how you specify addresses. The code sample shown in Listing 2-4 includes material that is described in greater detail in the next two chapters, "Providers" and "Endpoints"; however, it is highly recommended that you read through the sections in this chapter that describe this code. Doing so will enable you to assimilate information in the later chapters more easily and will give you a general sense of what an Open Transport program is like.

The corresponding reference chapter, "Initializing and Closing Open Transport Reference" provides more detailed information about the data structures and functions introduced in this chapter.


Chapter Contents
Initializing Open Transport
Initializing From a Client Application
Initializing From a Stand-Alone Code Resource
Using ASLM and Open Transport
Using the Gestalt Function to Determine Whether Open Transport Is Available
Configuring and Opening a Provider
Creating a Configuration Structure
Opening a Provider
Reusing Provider Configurations
Specifying an Address
Addressing in Open Transport
Using TNetBuf Structures
Storing an Address in a TNetBuf Structure
Using Helper Routines to Initialize an Address
Closing Open Transport
Closing From Applications
Closing From Stand-Alone Code
Open Transport Libraries
Downloading a URL With HTTP
Using Threads for Easy Synchronous Processing
Specifying the Host Names and HTTP Commands
Opening an Endpoint and Setting the Mode of Operation
Connecting to the Host and Sending Data
Receiving Data From the Remote Endpoint
Error Handling
Unbinding the Endpoint and Final Clean-Up

Previous Book Contents Book Index Next

© Apple Computer, Inc.
15 JAN 1998