The OTData Structure
You use theOTDatastructure to specify the location and size of noncontiguous data. You can use this structure in place of the normalTNetbufstructure to describe a data buffer when sending data using theOTSndUDatafunction (page 3-101), theOTSndURequestfunction (page 3-107), theOTSndUReplyfunction (page 3-112), theOTSndfunction (page 3-130),theOTSndRequestfunction (page 3-137), and theOTSndReplyfunction (page 3-141).
When transferring data, you normally specify a pointer to a
- WARNING
- The
OTDatastructure is an Apple extension to the XTI specification. Using it might cause your program not to work when ported to other XTI/STREAMS environments.![]()
TNetbufstructure that specifies the location and size of the buffer containing the data. However, you cannot use aTNetbufstructure to describe data that is noncontiguous. Instead you must use anOTDatastructure to describe each separate chunk of data. When the function that sends the data executes, it is able to locate all
the chunks of data, given a pointer to theOTDatastructure that describes the first chunk.Using the
OTDatastructure enables you to send data that is not contiguous, but the total size of the data fragments must not exceed the maximum size of data that the endpoint can send. The limits for normal and expedited data are specified in thetsduandetsdufields of theTEndpointInfostructure for the endpoint.Each
OTDatastructure specifies the location of a data fragment, the size of the fragment, and the location of theOTDatastructure that specifies the location and size of the next data fragment. The data information structure is defined by theOTDatatype.
struct OTData { void* fNext; void* fData; size_t fLen; }; typedef struct OTData OTData;
Field Description
fNext- A pointer to the
OTDatastructure that describes the next data fragment. Specify aNULLpointer for the last data fragment.fData- A pointer to the data fragment.
fLen- A long specifying the size of the fragment in bytes.
Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help