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 / Functions
Obtaining Information About an Endpoint /


OTGetEndpointState

Obtains the current state of an endpoint.

C INTERFACE
OTResult OTGetEndpointState(EndpointRef ref);
C++ INTERFACE
OTResult TEndpoint::GetEndpointState();
PARAMETERS
ref
The endpoint reference of the endpoint whose state you want to determine.
function result
A non-negative number indicating the state of the endpoint. Or, a negative number if ref is invalid.
DISCUSSION
The OTGetEndpointState function returns an integer greater than or equal to 0 indicating the state of the specified endpoint. The endpoint state enumeration describes possible endpoint states and lists their decimal value.

This function returns endpoint state information immediately, whether the endpoint is in synchronous or asynchronous mode.

You might need to know an endpoint's state in order to determine whether a function has completed or whether the endpoint is in an appropriate state for the function that you want to call next.

The only time this function fails is if you have provided an invalid endpoint reference.

SEE ALSO
The OTGetEndpointInfo function.

"Endpoint States" and "Endpoint States".

Table 4-4 .


Previous Book Contents Book Index Next

© Apple Computer, Inc.
15 JAN 1998