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 TBind Structure

The TBind structure describes the protocol address to which an endpoint is currently bound or connected, or specifies the protocol address to which you wish to bind or connect the endpoint. For a connection-oriented endpoint, the TBind structure also specifies the actual or desired number of connection requests that can be concurrently outstanding for the endpoint.

You pass the TBind structure as a parameter to the OTBind function, the OTGetProtAddress function, and the OTResolveAddress function.

The TBind structure is defined by the TBind data type.

struct TBind
{
   TNetbuf  addr;
   OTQLen   qlen;
};
typedef struct TBindTBind;
Field Description
addr
A TNetbuf structure that contains information about an address. The addr.maxlen field specifies the maximum size of the address, the addr.len field specifies the actual length of the address, and the addr.buf field points to the buffer containing the address.

When specifying an address, you must allocate a buffer for the address and initialize it; you must set the addr.buf field to point to this buffer; and you must set the addr.len field to the size of the address.
When requesting an address, you must allocate a buffer in which the address is to be placed; you must set the addr.buf field to point to this buffer; and you must set the addr.maxlen field to the maximum size of the address that is being returned. You determine this value by examining the addr field of the TEndpointInfo structure for the endpoint.
qlen
For a connection-oriented endpoint, the maximum number of connection requests that can be concurrently outstanding for this endpoint. For more information, see the description of the OTBind function. For connectionless endpoints, this field has no meaning.

Previous Book Contents Book Index Next

© Apple Computer, Inc.
15 JAN 1998