Binding and Unbinding Endpoints
Binding an endpoint is the process of assigning an address to it. An address is the value by which a provider's highest-layer protocol module identifies the endpoint. For example, in AppleTalk, the protocol address of an ADSP endpoint is its network ID, node ID, and DDP socket number; in TCP/IP, the protocol address of a UDP endpoint is its port number and IP address. An endpoint must have a protocol address to transfer information.You assign an address to an endpoint by calling the
OTBindfunction. After binding, connectionless endpoints can send and receive data; connection-oriented endpoints can send and receive connection requests. If you use theOTAcceptfunction (page 3-127) to pass off a connection request to another endpoint, it is not necessary to bind that endpoint first.An endpoint can be bound to only one address at a time. If you no longer need to use an endpoint or if you want to change its address, you can unbind the endpoint using the
OTUnbindfunction. In this case, Open Transport dissociates the endpoint from the address assigned to it. After the endpoint is unbound, you can close the endpoint using theOTCloseProviderfunction, or you can bind the endpoint to another address by using theOTBindfunction. You should not assume, after unbinding an endpoint, that you can bind the endpoint again to its former address. Of course, you can request the previous address when calling theOTBindfunction.
- IMPORTANT
- You must not close an endpoint during binding and unbinding; closing an endpoint deallocates memory reserved for it and the structures it uses.
![]()
Subtopics
- OTBind
- OTUnbind
Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help