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 a Client Session

When a client session ends, the XStxServerManager object fires an XStxIServerManagerListenerFcnServerTerminate event. This gives your application a chance to gracefully release resources associated with the client session.

The following excerpt from the sample streaming application illustrates this step. It is from ServerManagerListener.cpp. This file is in the <SDK_dir>\example_src\server\common directory.

XStxResult ServerManagerListenerImp::XStxIServerManagerListenerServerTerminate( XStxServerHandle session, uint32_t timeout, XStxStopReason reason) { ... if (info != NULL) { XStxServerRecycle(info->mServer); delete info->mApp; delete info; } return XSTX_RESULT_OK; }