User guide
2: Freeway Client-Server Protocol
DC 900-1303C 23
of TSI data packets can begin immediately. Figure 2–1 on page 25 shows an example of
this type of data flow.
If the client receives a Bind request back from the server, it can accept the server com-
munication conditions in the Bind request by sending an ACK packet to the server.
When the server receives the ACK packet, it is ready to accept the first data packet.
Figure 2–2 on page 25 shows an example of this type of data flow.
If the client cannot accept the communication conditions in the Bind request from the
server, it sends a NAK packet to the server, followed by an Unbind control packet to ini-
tiate termination of the connection.
Unbind
When a TSI application wants to terminate the socket connection gracefully, it sends
the remote TSI application an Unbind control packet. When the Unbind request is
received, the TSI application checks its internal I/O queues, and if they are not empty, it
sends a NAK control packet; otherwise, it sends an ACK control packet. Client applica-
tions should not use the Unbind packet, but should use the Unbind Force packet
instead.
Unbind Force
When a client application wants to unconditionally terminate a socket connection,
without regard to completing active I/O requests, it sends the server an Unbind Force
control packet. When it receives this packet, the server TSI removes all I/O requests
from its internal I/O queues for the connection and frees the I/O requests by using the
tBufFree function. The server TSI then closes the socket on the server. No response is
issued to the client. The client is responsible for closing the socket on the client. The cli-
ent application should use the Unbind Force control packet if it wants to close a connec-
tion with the server. Figure 2–1 and Figure 2–2 shows examples of how an Unbind
Force control packet is used.