Menu
Amazon AppStream
Developer Guide

This documentation is for an older version of Amazon AppStream. For information about the latest version, see the Amazon AppStream 2.0 Developer Guide.

Terminating Your Client

The client can end the session with the application in the following ways:

  • End the session and then confirm the session ended.

  • End the session without regard as to when the session ends.

To end the session and then confirm the session ended, first call XStxClientStop. This is a non-blocking function call that immediately returns a result. If the call was successful, then call XStxClientWait to wait until the session actually ends. When the XStxClientWait call is successful, call XStxClientRecycle to recycle the client handle.

To end the session without regard as to when the session ends, call XStxClientRecycle. The session then ends without further interaction from the client.

The following excerpt from the example client in the Amazon AppStream SDK illustrates this step. The excerpt is from the XStxModule::recycle function in XStxModule.cpp.

Copy
XStxResult XStxModule::recycle() { XStxResult result = XStxClientRecycle(mClientHandle); if (result != XSTX_RESULT_OK) return result; else return XStxClientLibraryRecycle(mClientLibraryHandle); }