Receiving Content from a Client
To provide a fully interactive experience for users, the client collects data from user input sources (such as keyboard, mouse, or touch inputs) and sends that data to the application so the application can respond to the user action. There are three types of content that a client may send to your application:
Formatted user input—such as keyboard, mouse or touch input.
Raw user input—a stream of bytes from the device. This enables your application to support new or device-specific types of input such as a data stream from an accelerometer.
Client messages—messages from the client to the application that are independent of user actions. These can be status messages, additional metadata, or other content as negotiated between the client and application developers.
Your application receives this content from the client as events sent by the
XStxServer object to
your callback functions. The following sections describe how to implement the callback functions to handle these