CallbackManager

This class is a utility for routing callbacks to function calls. In order to bind callbacks to functions, an instance of this class must be created for the SteamClient instance that will be posting callbacks.

Parameters

steamClient

The SteamClient instance to handle the callbacks of.

Constructors

Link copied to clipboard
constructor(steamClient: SteamClient)

Initializes a new instance of the CallbackManager class.

Functions

Link copied to clipboard
open override fun register(callback: CallbackBase)
Link copied to clipboard

Runs a single queued callback. If no callback is queued, this method will instantly return.

Link copied to clipboard

Blocks the current thread to run all queued callbacks. If no callback is queued, the method will block for the given timeout or until a callback becomes available. This method returns once the queue has been emptied.

Link copied to clipboard
suspend fun runWaitCallbackAsync()
Link copied to clipboard

Blocks the current thread to run a single queued callback. If no callback is queued, the method will block until one becomes available.

Blocks the current thread to run a single queued callback. If no callback is queued, the method will block for the given timeout or until a callback becomes available.

Link copied to clipboard
fun <TCallback : ICallbackMsg> subscribe(callbackType: Class<out TCallback>, callbackFunc: Consumer<TCallback>): Closeable
fun <TCallback : ICallbackMsg> subscribe(callbackType: Class<out TCallback>, jobID: JobID, callbackFunc: Consumer<TCallback>): Closeable

Registers the provided Consumer to receive callbacks of type TCallback

Link copied to clipboard
open override fun unregister(callback: CallbackBase)