Callbacks and call results
Respond to Steamworks events and get the results of your Steamworks calls in your application.
The Steamworks API delivers two types of messages to your application: callbacks and call results. A callback is an event that the Steamworks API broadcasts and a call result is the response to a specific Steamworks call. By default, the package reads these messages from the callback queue and delivers them to your code. You can choose to read the messages from your own application code by selecting a different dispatch mode.
| Topic | Description |
|---|---|
| Callback delivery | Understand how the package reads the callback queue and delivers callbacks to your code, including when the handlers run and how long the callback data remains valid. |
| Handle callbacks and call results | Subscribe to callbacks to respond to Steamworks events and await call results to get responses to your API requests. |
| Choose a callback dispatch mode | Select a dispatch mode to allow the package or your application code to read the callback queue. |
Note
Awaiting call results uses asynchronous programming concepts, such as await and Task. For more information, refer to Asynchronous programming in C# (Microsoft). For information on callbacks and call results in the Steamworks API, refer to Callbacks and Call results.
Additional resources
- Initialize and shut down the Steamworks API
- Steamworks API package components
- Callbacks (Valve)
- Call results (Valve)
- Asynchronous programming in C# (Microsoft)