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 2 - Open Transport Reference
Chapter 22 - Endpoints Reference / Constants and Data Types


The TCall Structure

You use the TCall structure to specify the options and data associated with establishing a connection. You pass a pointer to this structure as a parameter to the OTConnect function, the OTRcvConnect function, the OTListen function, and the OTAccept function.

If you are using the TCall structure to send information, you must allocate a buffer and initialize it to contain the information. Set the.buf field of each TNetbuf to point to the buffer, and then specify the size of the buffer using the .len field. Set this field to 0 if you are not sending data.

If you are using the TCall structure to receive information, you must allocate a buffer into which the function can place the information when it returns. Then set the .buf field of all the TNetbufs to point to this buffer, and set the .maxlen field to the maximum size of the information. Set this field to 0 if you are not interested in receiving information.

The TCall structure is defined by the TCall data type.

struct TCall
   {
      TNetbuf     addr;
      TNetbuf     opt;
      TNetbuf     udata;
      OTSequence  sequence;
   };
   typedef struct TCall TCall;
Field Description
addr
A TNetbuf structure that specifies the location and size of an address buffer.
opt
A TNetbuf structure that specifies the location and size of an options buffer.
udata
A TNetbuf structure that specifies the location and size of a buffer for data associated with a connection or disconnection request.
sequence
A 32-bit value used by the OTListen and OTAccept functions to specify the connection ID.

Previous Book Contents Book Index Next

© Apple Computer, Inc.
15 JAN 1998