4.2 Packet Exchanges to Terminate the Session

Client terminating the session

Figure 4: Client terminating the session

The client can terminate the session by following the steps below:

  1. The client calls ClientRequest with Close and the specified open line device to close the line. The server closes the line and returns 0 if it is successful and a negative error number if an error occurs.

  2. The client then calls ClientRequest with Shutdown to terminate the application's use of the line abstraction. The server shuts down the abstraction and returns 0 if it is successful and a negative error number if an error occurs.

  3. The client finally calls ClientDetach to detach from the binding instance. In response, the server frees the referenced binding instance and releases the allocated resources associated with the client.