Class ISteamMatchmakingPingResponse
Managed implementation of the C++ ISteamMatchmakingPingResponse callback sink
passed to PingServer(uint, ushort, ISteamMatchmakingPingResponse). Dispose it once the query resolves (a
ISteamMatchmakingPingResponse.ServerRespondedHandler or ISteamMatchmakingPingResponse.ServerFailedToRespondHandler call) or is
cancelled with CancelServerQuery(HServerQuery), and not before. An
undisposed sink is never collected.
Handlers are invoked on the thread that dispatches the pipe: the package's callback thread, or the thread that calls RunFrameCallbacks(bool) or performs its own dispatch. When that is not the main thread, calls to Unity APIs must be marshalled to the main thread. Handler exceptions are caught and routed to ExceptionHandler.
Implements
Inherited Members
Namespace: Unity.Steamworks.Interop
Assembly: Unity.Steamworks.Interop.dll
Syntax
public sealed class ISteamMatchmakingPingResponse : IDisposable
Constructors
ISteamMatchmakingPingResponse(ServerRespondedHandler, ServerFailedToRespondHandler)
Creates the native object that Steam calls back into. Every handler is required.
Declaration
public ISteamMatchmakingPingResponse(ISteamMatchmakingPingResponse.ServerRespondedHandler onServerResponded, ISteamMatchmakingPingResponse.ServerFailedToRespondHandler onServerFailedToRespond)
Parameters
| Type | Name | Description |
|---|---|---|
| ISteamMatchmakingPingResponse.ServerRespondedHandler | onServerResponded | Called with the server's details when it answers. |
| ISteamMatchmakingPingResponse.ServerFailedToRespondHandler | onServerFailedToRespond | Called when the server does not answer the ping. |
Methods
Dispose()
Frees the native response object and releases the handle that kept this sink alive.
Declaration
public void Dispose()
Operators
explicit operator IntPtr(ISteamMatchmakingPingResponse)
The native interface pointer the flat API takes for this sink.
Declaration
public static explicit operator IntPtr(ISteamMatchmakingPingResponse that)
Parameters
| Type | Name | Description |
|---|---|---|
| ISteamMatchmakingPingResponse | that | The sink to convert; may be null. |
Returns
| Type | Description |
|---|---|
| IntPtr | The native object's address, or Zero when |