Class ISteamMatchmakingServerFriendsResponse
Managed implementation of the C++ ISteamMatchmakingServerFriendsResponse callback sink
passed to ServerFriends(uint, ushort, ISteamMatchmakingServerFriendsResponse). One
ISteamMatchmakingServerFriendsResponse.AddFriendToListHandler call is made per friend who has played on the server, followed
by either ISteamMatchmakingServerFriendsResponse.FriendsRefreshCompleteHandler or ISteamMatchmakingServerFriendsResponse.FriendsFailedToRespondHandler.
Dispose it after that call or after 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 ISteamMatchmakingServerFriendsResponse : IDisposable
Constructors
ISteamMatchmakingServerFriendsResponse(AddFriendToListHandler, FriendsFailedToRespondHandler, FriendsRefreshCompleteHandler)
Creates the native object that Steam calls back into. Every handler is required.
Declaration
public ISteamMatchmakingServerFriendsResponse(ISteamMatchmakingServerFriendsResponse.AddFriendToListHandler onAddFriendToList, ISteamMatchmakingServerFriendsResponse.FriendsFailedToRespondHandler onFriendsFailedToRespond, ISteamMatchmakingServerFriendsResponse.FriendsRefreshCompleteHandler onFriendsRefreshComplete)
Parameters
| Type | Name | Description |
|---|---|---|
| ISteamMatchmakingServerFriendsResponse.AddFriendToListHandler | onAddFriendToList | Called once per friend as the server reports them. |
| ISteamMatchmakingServerFriendsResponse.FriendsFailedToRespondHandler | onFriendsFailedToRespond | Called when the server did not answer. |
| ISteamMatchmakingServerFriendsResponse.FriendsRefreshCompleteHandler | onFriendsRefreshComplete | Called once every friend has been reported. |
Methods
Dispose()
Frees the native response object and releases the handle that kept this sink alive.
Declaration
public void Dispose()
Operators
explicit operator IntPtr(ISteamMatchmakingServerFriendsResponse)
The native interface pointer the flat API takes for this sink.
Declaration
public static explicit operator IntPtr(ISteamMatchmakingServerFriendsResponse that)
Parameters
| Type | Name | Description |
|---|---|---|
| ISteamMatchmakingServerFriendsResponse | that | The sink to convert; may be null. |
Returns
| Type | Description |
|---|---|
| IntPtr | The native object's address, or Zero when |