isteamgameserver.cs (23418B)
1 // This file is provided under The MIT License as part of Steamworks.NET. 2 // Copyright (c) 2013-2019 Riley Labrecque 3 // Please see the included LICENSE.txt for additional information. 4 5 // This file is automatically generated. 6 // Changes to this file will be reverted when you update Steamworks.NET 7 8 #if UNITY_ANDROID || UNITY_IOS || UNITY_TIZEN || UNITY_TVOS || UNITY_WEBGL || UNITY_WSA || UNITY_PS4 || UNITY_WII || UNITY_XBOXONE || UNITY_SWITCH 9 #define DISABLESTEAMWORKS 10 #endif 11 12 #if !DISABLESTEAMWORKS 13 14 using System.Runtime.InteropServices; 15 using IntPtr = System.IntPtr; 16 17 namespace Steamworks { 18 public static class SteamGameServer { 19 /// <summary> 20 /// <para> Basic server data. These properties, if set, must be set before before calling LogOn. They</para> 21 /// <para> may not be changed after logged in.</para> 22 /// <para>/ This is called by SteamGameServer_Init, and you will usually not need to call it directly</para> 23 /// </summary> 24 public static bool InitGameServer(uint unIP, ushort usGamePort, ushort usQueryPort, uint unFlags, AppId_t nGameAppId, string pchVersionString) { 25 InteropHelp.TestIfAvailableGameServer(); 26 using (var pchVersionString2 = new InteropHelp.UTF8StringHandle(pchVersionString)) { 27 return NativeMethods.ISteamGameServer_InitGameServer(CSteamGameServerAPIContext.GetSteamGameServer(), unIP, usGamePort, usQueryPort, unFlags, nGameAppId, pchVersionString2); 28 } 29 } 30 31 /// <summary> 32 /// <para>/ Game product identifier. This is currently used by the master server for version checking purposes.</para> 33 /// <para>/ It's a required field, but will eventually will go away, and the AppID will be used for this purpose.</para> 34 /// </summary> 35 public static void SetProduct(string pszProduct) { 36 InteropHelp.TestIfAvailableGameServer(); 37 using (var pszProduct2 = new InteropHelp.UTF8StringHandle(pszProduct)) { 38 NativeMethods.ISteamGameServer_SetProduct(CSteamGameServerAPIContext.GetSteamGameServer(), pszProduct2); 39 } 40 } 41 42 /// <summary> 43 /// <para>/ Description of the game. This is a required field and is displayed in the steam server browser....for now.</para> 44 /// <para>/ This is a required field, but it will go away eventually, as the data should be determined from the AppID.</para> 45 /// </summary> 46 public static void SetGameDescription(string pszGameDescription) { 47 InteropHelp.TestIfAvailableGameServer(); 48 using (var pszGameDescription2 = new InteropHelp.UTF8StringHandle(pszGameDescription)) { 49 NativeMethods.ISteamGameServer_SetGameDescription(CSteamGameServerAPIContext.GetSteamGameServer(), pszGameDescription2); 50 } 51 } 52 53 /// <summary> 54 /// <para>/ If your game is a "mod," pass the string that identifies it. The default is an empty string, meaning</para> 55 /// <para>/ this application is the original game, not a mod.</para> 56 /// <para>/</para> 57 /// <para>/ @see k_cbMaxGameServerGameDir</para> 58 /// </summary> 59 public static void SetModDir(string pszModDir) { 60 InteropHelp.TestIfAvailableGameServer(); 61 using (var pszModDir2 = new InteropHelp.UTF8StringHandle(pszModDir)) { 62 NativeMethods.ISteamGameServer_SetModDir(CSteamGameServerAPIContext.GetSteamGameServer(), pszModDir2); 63 } 64 } 65 66 /// <summary> 67 /// <para>/ Is this is a dedicated server? The default value is false.</para> 68 /// </summary> 69 public static void SetDedicatedServer(bool bDedicated) { 70 InteropHelp.TestIfAvailableGameServer(); 71 NativeMethods.ISteamGameServer_SetDedicatedServer(CSteamGameServerAPIContext.GetSteamGameServer(), bDedicated); 72 } 73 74 /// <summary> 75 /// <para> Login</para> 76 /// <para>/ Begin process to login to a persistent game server account</para> 77 /// <para>/</para> 78 /// <para>/ You need to register for callbacks to determine the result of this operation.</para> 79 /// <para>/ @see SteamServersConnected_t</para> 80 /// <para>/ @see SteamServerConnectFailure_t</para> 81 /// <para>/ @see SteamServersDisconnected_t</para> 82 /// </summary> 83 public static void LogOn(string pszToken) { 84 InteropHelp.TestIfAvailableGameServer(); 85 using (var pszToken2 = new InteropHelp.UTF8StringHandle(pszToken)) { 86 NativeMethods.ISteamGameServer_LogOn(CSteamGameServerAPIContext.GetSteamGameServer(), pszToken2); 87 } 88 } 89 90 /// <summary> 91 /// <para>/ Login to a generic, anonymous account.</para> 92 /// <para>/</para> 93 /// <para>/ Note: in previous versions of the SDK, this was automatically called within SteamGameServer_Init,</para> 94 /// <para>/ but this is no longer the case.</para> 95 /// </summary> 96 public static void LogOnAnonymous() { 97 InteropHelp.TestIfAvailableGameServer(); 98 NativeMethods.ISteamGameServer_LogOnAnonymous(CSteamGameServerAPIContext.GetSteamGameServer()); 99 } 100 101 /// <summary> 102 /// <para>/ Begin process of logging game server out of steam</para> 103 /// </summary> 104 public static void LogOff() { 105 InteropHelp.TestIfAvailableGameServer(); 106 NativeMethods.ISteamGameServer_LogOff(CSteamGameServerAPIContext.GetSteamGameServer()); 107 } 108 109 /// <summary> 110 /// <para> status functions</para> 111 /// </summary> 112 public static bool BLoggedOn() { 113 InteropHelp.TestIfAvailableGameServer(); 114 return NativeMethods.ISteamGameServer_BLoggedOn(CSteamGameServerAPIContext.GetSteamGameServer()); 115 } 116 117 public static bool BSecure() { 118 InteropHelp.TestIfAvailableGameServer(); 119 return NativeMethods.ISteamGameServer_BSecure(CSteamGameServerAPIContext.GetSteamGameServer()); 120 } 121 122 public static CSteamID GetSteamID() { 123 InteropHelp.TestIfAvailableGameServer(); 124 return (CSteamID)NativeMethods.ISteamGameServer_GetSteamID(CSteamGameServerAPIContext.GetSteamGameServer()); 125 } 126 127 /// <summary> 128 /// <para>/ Returns true if the master server has requested a restart.</para> 129 /// <para>/ Only returns true once per request.</para> 130 /// </summary> 131 public static bool WasRestartRequested() { 132 InteropHelp.TestIfAvailableGameServer(); 133 return NativeMethods.ISteamGameServer_WasRestartRequested(CSteamGameServerAPIContext.GetSteamGameServer()); 134 } 135 136 /// <summary> 137 /// <para> Server state. These properties may be changed at any time.</para> 138 /// <para>/ Max player count that will be reported to server browser and client queries</para> 139 /// </summary> 140 public static void SetMaxPlayerCount(int cPlayersMax) { 141 InteropHelp.TestIfAvailableGameServer(); 142 NativeMethods.ISteamGameServer_SetMaxPlayerCount(CSteamGameServerAPIContext.GetSteamGameServer(), cPlayersMax); 143 } 144 145 /// <summary> 146 /// <para>/ Number of bots. Default value is zero</para> 147 /// </summary> 148 public static void SetBotPlayerCount(int cBotplayers) { 149 InteropHelp.TestIfAvailableGameServer(); 150 NativeMethods.ISteamGameServer_SetBotPlayerCount(CSteamGameServerAPIContext.GetSteamGameServer(), cBotplayers); 151 } 152 153 /// <summary> 154 /// <para>/ Set the name of server as it will appear in the server browser</para> 155 /// <para>/</para> 156 /// <para>/ @see k_cbMaxGameServerName</para> 157 /// </summary> 158 public static void SetServerName(string pszServerName) { 159 InteropHelp.TestIfAvailableGameServer(); 160 using (var pszServerName2 = new InteropHelp.UTF8StringHandle(pszServerName)) { 161 NativeMethods.ISteamGameServer_SetServerName(CSteamGameServerAPIContext.GetSteamGameServer(), pszServerName2); 162 } 163 } 164 165 /// <summary> 166 /// <para>/ Set name of map to report in the server browser</para> 167 /// <para>/</para> 168 /// <para>/ @see k_cbMaxGameServerName</para> 169 /// </summary> 170 public static void SetMapName(string pszMapName) { 171 InteropHelp.TestIfAvailableGameServer(); 172 using (var pszMapName2 = new InteropHelp.UTF8StringHandle(pszMapName)) { 173 NativeMethods.ISteamGameServer_SetMapName(CSteamGameServerAPIContext.GetSteamGameServer(), pszMapName2); 174 } 175 } 176 177 /// <summary> 178 /// <para>/ Let people know if your server will require a password</para> 179 /// </summary> 180 public static void SetPasswordProtected(bool bPasswordProtected) { 181 InteropHelp.TestIfAvailableGameServer(); 182 NativeMethods.ISteamGameServer_SetPasswordProtected(CSteamGameServerAPIContext.GetSteamGameServer(), bPasswordProtected); 183 } 184 185 /// <summary> 186 /// <para>/ Spectator server. The default value is zero, meaning the service</para> 187 /// <para>/ is not used.</para> 188 /// </summary> 189 public static void SetSpectatorPort(ushort unSpectatorPort) { 190 InteropHelp.TestIfAvailableGameServer(); 191 NativeMethods.ISteamGameServer_SetSpectatorPort(CSteamGameServerAPIContext.GetSteamGameServer(), unSpectatorPort); 192 } 193 194 /// <summary> 195 /// <para>/ Name of the spectator server. (Only used if spectator port is nonzero.)</para> 196 /// <para>/</para> 197 /// <para>/ @see k_cbMaxGameServerMapName</para> 198 /// </summary> 199 public static void SetSpectatorServerName(string pszSpectatorServerName) { 200 InteropHelp.TestIfAvailableGameServer(); 201 using (var pszSpectatorServerName2 = new InteropHelp.UTF8StringHandle(pszSpectatorServerName)) { 202 NativeMethods.ISteamGameServer_SetSpectatorServerName(CSteamGameServerAPIContext.GetSteamGameServer(), pszSpectatorServerName2); 203 } 204 } 205 206 /// <summary> 207 /// <para>/ Call this to clear the whole list of key/values that are sent in rules queries.</para> 208 /// </summary> 209 public static void ClearAllKeyValues() { 210 InteropHelp.TestIfAvailableGameServer(); 211 NativeMethods.ISteamGameServer_ClearAllKeyValues(CSteamGameServerAPIContext.GetSteamGameServer()); 212 } 213 214 /// <summary> 215 /// <para>/ Call this to add/update a key/value pair.</para> 216 /// </summary> 217 public static void SetKeyValue(string pKey, string pValue) { 218 InteropHelp.TestIfAvailableGameServer(); 219 using (var pKey2 = new InteropHelp.UTF8StringHandle(pKey)) 220 using (var pValue2 = new InteropHelp.UTF8StringHandle(pValue)) { 221 NativeMethods.ISteamGameServer_SetKeyValue(CSteamGameServerAPIContext.GetSteamGameServer(), pKey2, pValue2); 222 } 223 } 224 225 /// <summary> 226 /// <para>/ Sets a string defining the "gametags" for this server, this is optional, but if it is set</para> 227 /// <para>/ it allows users to filter in the matchmaking/server-browser interfaces based on the value</para> 228 /// <para>/</para> 229 /// <para>/ @see k_cbMaxGameServerTags</para> 230 /// </summary> 231 public static void SetGameTags(string pchGameTags) { 232 InteropHelp.TestIfAvailableGameServer(); 233 using (var pchGameTags2 = new InteropHelp.UTF8StringHandle(pchGameTags)) { 234 NativeMethods.ISteamGameServer_SetGameTags(CSteamGameServerAPIContext.GetSteamGameServer(), pchGameTags2); 235 } 236 } 237 238 /// <summary> 239 /// <para>/ Sets a string defining the "gamedata" for this server, this is optional, but if it is set</para> 240 /// <para>/ it allows users to filter in the matchmaking/server-browser interfaces based on the value</para> 241 /// <para>/ don't set this unless it actually changes, its only uploaded to the master once (when</para> 242 /// <para>/ acknowledged)</para> 243 /// <para>/</para> 244 /// <para>/ @see k_cbMaxGameServerGameData</para> 245 /// </summary> 246 public static void SetGameData(string pchGameData) { 247 InteropHelp.TestIfAvailableGameServer(); 248 using (var pchGameData2 = new InteropHelp.UTF8StringHandle(pchGameData)) { 249 NativeMethods.ISteamGameServer_SetGameData(CSteamGameServerAPIContext.GetSteamGameServer(), pchGameData2); 250 } 251 } 252 253 /// <summary> 254 /// <para>/ Region identifier. This is an optional field, the default value is empty, meaning the "world" region</para> 255 /// </summary> 256 public static void SetRegion(string pszRegion) { 257 InteropHelp.TestIfAvailableGameServer(); 258 using (var pszRegion2 = new InteropHelp.UTF8StringHandle(pszRegion)) { 259 NativeMethods.ISteamGameServer_SetRegion(CSteamGameServerAPIContext.GetSteamGameServer(), pszRegion2); 260 } 261 } 262 263 /// <summary> 264 /// <para> Player list management / authentication</para> 265 /// <para> Handles receiving a new connection from a Steam user. This call will ask the Steam</para> 266 /// <para> servers to validate the users identity, app ownership, and VAC status. If the Steam servers</para> 267 /// <para> are off-line, then it will validate the cached ticket itself which will validate app ownership</para> 268 /// <para> and identity. The AuthBlob here should be acquired on the game client using SteamUser()->InitiateGameConnection()</para> 269 /// <para> and must then be sent up to the game server for authentication.</para> 270 /// <para> Return Value: returns true if the users ticket passes basic checks. pSteamIDUser will contain the Steam ID of this user. pSteamIDUser must NOT be NULL</para> 271 /// <para> If the call succeeds then you should expect a GSClientApprove_t or GSClientDeny_t callback which will tell you whether authentication</para> 272 /// <para> for the user has succeeded or failed (the steamid in the callback will match the one returned by this call)</para> 273 /// </summary> 274 public static bool SendUserConnectAndAuthenticate(uint unIPClient, byte[] pvAuthBlob, uint cubAuthBlobSize, out CSteamID pSteamIDUser) { 275 InteropHelp.TestIfAvailableGameServer(); 276 return NativeMethods.ISteamGameServer_SendUserConnectAndAuthenticate(CSteamGameServerAPIContext.GetSteamGameServer(), unIPClient, pvAuthBlob, cubAuthBlobSize, out pSteamIDUser); 277 } 278 279 /// <summary> 280 /// <para> Creates a fake user (ie, a bot) which will be listed as playing on the server, but skips validation.</para> 281 /// <para> Return Value: Returns a SteamID for the user to be tracked with, you should call HandleUserDisconnect()</para> 282 /// <para> when this user leaves the server just like you would for a real user.</para> 283 /// </summary> 284 public static CSteamID CreateUnauthenticatedUserConnection() { 285 InteropHelp.TestIfAvailableGameServer(); 286 return (CSteamID)NativeMethods.ISteamGameServer_CreateUnauthenticatedUserConnection(CSteamGameServerAPIContext.GetSteamGameServer()); 287 } 288 289 /// <summary> 290 /// <para> Should be called whenever a user leaves our game server, this lets Steam internally</para> 291 /// <para> track which users are currently on which servers for the purposes of preventing a single</para> 292 /// <para> account being logged into multiple servers, showing who is currently on a server, etc.</para> 293 /// </summary> 294 public static void SendUserDisconnect(CSteamID steamIDUser) { 295 InteropHelp.TestIfAvailableGameServer(); 296 NativeMethods.ISteamGameServer_SendUserDisconnect(CSteamGameServerAPIContext.GetSteamGameServer(), steamIDUser); 297 } 298 299 /// <summary> 300 /// <para> Update the data to be displayed in the server browser and matchmaking interfaces for a user</para> 301 /// <para> currently connected to the server. For regular users you must call this after you receive a</para> 302 /// <para> GSUserValidationSuccess callback.</para> 303 /// <para> Return Value: true if successful, false if failure (ie, steamIDUser wasn't for an active player)</para> 304 /// </summary> 305 public static bool BUpdateUserData(CSteamID steamIDUser, string pchPlayerName, uint uScore) { 306 InteropHelp.TestIfAvailableGameServer(); 307 using (var pchPlayerName2 = new InteropHelp.UTF8StringHandle(pchPlayerName)) { 308 return NativeMethods.ISteamGameServer_BUpdateUserData(CSteamGameServerAPIContext.GetSteamGameServer(), steamIDUser, pchPlayerName2, uScore); 309 } 310 } 311 312 /// <summary> 313 /// <para> New auth system APIs - do not mix with the old auth system APIs.</para> 314 /// <para> ----------------------------------------------------------------</para> 315 /// <para> Retrieve ticket to be sent to the entity who wishes to authenticate you ( using BeginAuthSession API ).</para> 316 /// <para> pcbTicket retrieves the length of the actual ticket.</para> 317 /// </summary> 318 public static HAuthTicket GetAuthSessionTicket(byte[] pTicket, int cbMaxTicket, out uint pcbTicket) { 319 InteropHelp.TestIfAvailableGameServer(); 320 return (HAuthTicket)NativeMethods.ISteamGameServer_GetAuthSessionTicket(CSteamGameServerAPIContext.GetSteamGameServer(), pTicket, cbMaxTicket, out pcbTicket); 321 } 322 323 /// <summary> 324 /// <para> Authenticate ticket ( from GetAuthSessionTicket ) from entity steamID to be sure it is valid and isnt reused</para> 325 /// <para> Registers for callbacks if the entity goes offline or cancels the ticket ( see ValidateAuthTicketResponse_t callback and EAuthSessionResponse )</para> 326 /// </summary> 327 public static EBeginAuthSessionResult BeginAuthSession(byte[] pAuthTicket, int cbAuthTicket, CSteamID steamID) { 328 InteropHelp.TestIfAvailableGameServer(); 329 return NativeMethods.ISteamGameServer_BeginAuthSession(CSteamGameServerAPIContext.GetSteamGameServer(), pAuthTicket, cbAuthTicket, steamID); 330 } 331 332 /// <summary> 333 /// <para> Stop tracking started by BeginAuthSession - called when no longer playing game with this entity</para> 334 /// </summary> 335 public static void EndAuthSession(CSteamID steamID) { 336 InteropHelp.TestIfAvailableGameServer(); 337 NativeMethods.ISteamGameServer_EndAuthSession(CSteamGameServerAPIContext.GetSteamGameServer(), steamID); 338 } 339 340 /// <summary> 341 /// <para> Cancel auth ticket from GetAuthSessionTicket, called when no longer playing game with the entity you gave the ticket to</para> 342 /// </summary> 343 public static void CancelAuthTicket(HAuthTicket hAuthTicket) { 344 InteropHelp.TestIfAvailableGameServer(); 345 NativeMethods.ISteamGameServer_CancelAuthTicket(CSteamGameServerAPIContext.GetSteamGameServer(), hAuthTicket); 346 } 347 348 /// <summary> 349 /// <para> After receiving a user's authentication data, and passing it to SendUserConnectAndAuthenticate, use this function</para> 350 /// <para> to determine if the user owns downloadable content specified by the provided AppID.</para> 351 /// </summary> 352 public static EUserHasLicenseForAppResult UserHasLicenseForApp(CSteamID steamID, AppId_t appID) { 353 InteropHelp.TestIfAvailableGameServer(); 354 return NativeMethods.ISteamGameServer_UserHasLicenseForApp(CSteamGameServerAPIContext.GetSteamGameServer(), steamID, appID); 355 } 356 357 /// <summary> 358 /// <para> Ask if a user in in the specified group, results returns async by GSUserGroupStatus_t</para> 359 /// <para> returns false if we're not connected to the steam servers and thus cannot ask</para> 360 /// </summary> 361 public static bool RequestUserGroupStatus(CSteamID steamIDUser, CSteamID steamIDGroup) { 362 InteropHelp.TestIfAvailableGameServer(); 363 return NativeMethods.ISteamGameServer_RequestUserGroupStatus(CSteamGameServerAPIContext.GetSteamGameServer(), steamIDUser, steamIDGroup); 364 } 365 366 /// <summary> 367 /// <para> these two functions s are deprecated, and will not return results</para> 368 /// <para> they will be removed in a future version of the SDK</para> 369 /// </summary> 370 public static void GetGameplayStats() { 371 InteropHelp.TestIfAvailableGameServer(); 372 NativeMethods.ISteamGameServer_GetGameplayStats(CSteamGameServerAPIContext.GetSteamGameServer()); 373 } 374 375 public static SteamAPICall_t GetServerReputation() { 376 InteropHelp.TestIfAvailableGameServer(); 377 return (SteamAPICall_t)NativeMethods.ISteamGameServer_GetServerReputation(CSteamGameServerAPIContext.GetSteamGameServer()); 378 } 379 380 /// <summary> 381 /// <para> Returns the public IP of the server according to Steam, useful when the server is</para> 382 /// <para> behind NAT and you want to advertise its IP in a lobby for other clients to directly</para> 383 /// <para> connect to</para> 384 /// </summary> 385 public static uint GetPublicIP() { 386 InteropHelp.TestIfAvailableGameServer(); 387 return NativeMethods.ISteamGameServer_GetPublicIP(CSteamGameServerAPIContext.GetSteamGameServer()); 388 } 389 390 /// <summary> 391 /// <para> These are in GameSocketShare mode, where instead of ISteamGameServer creating its own</para> 392 /// <para> socket to talk to the master server on, it lets the game use its socket to forward messages</para> 393 /// <para> back and forth. This prevents us from requiring server ops to open up yet another port</para> 394 /// <para> in their firewalls.</para> 395 /// <para> the IP address and port should be in host order, i.e 127.0.0.1 == 0x7f000001</para> 396 /// <para> These are used when you've elected to multiplex the game server's UDP socket</para> 397 /// <para> rather than having the master server updater use its own sockets.</para> 398 /// <para> Source games use this to simplify the job of the server admins, so they</para> 399 /// <para> don't have to open up more ports on their firewalls.</para> 400 /// <para> Call this when a packet that starts with 0xFFFFFFFF comes in. That means</para> 401 /// <para> it's for us.</para> 402 /// </summary> 403 public static bool HandleIncomingPacket(byte[] pData, int cbData, uint srcIP, ushort srcPort) { 404 InteropHelp.TestIfAvailableGameServer(); 405 return NativeMethods.ISteamGameServer_HandleIncomingPacket(CSteamGameServerAPIContext.GetSteamGameServer(), pData, cbData, srcIP, srcPort); 406 } 407 408 /// <summary> 409 /// <para> AFTER calling HandleIncomingPacket for any packets that came in that frame, call this.</para> 410 /// <para> This gets a packet that the master server updater needs to send out on UDP.</para> 411 /// <para> It returns the length of the packet it wants to send, or 0 if there are no more packets to send.</para> 412 /// <para> Call this each frame until it returns 0.</para> 413 /// </summary> 414 public static int GetNextOutgoingPacket(byte[] pOut, int cbMaxOut, out uint pNetAdr, out ushort pPort) { 415 InteropHelp.TestIfAvailableGameServer(); 416 return NativeMethods.ISteamGameServer_GetNextOutgoingPacket(CSteamGameServerAPIContext.GetSteamGameServer(), pOut, cbMaxOut, out pNetAdr, out pPort); 417 } 418 419 /// <summary> 420 /// <para> Control heartbeats / advertisement with master server</para> 421 /// <para> Call this as often as you like to tell the master server updater whether or not</para> 422 /// <para> you want it to be active (default: off).</para> 423 /// </summary> 424 public static void EnableHeartbeats(bool bActive) { 425 InteropHelp.TestIfAvailableGameServer(); 426 NativeMethods.ISteamGameServer_EnableHeartbeats(CSteamGameServerAPIContext.GetSteamGameServer(), bActive); 427 } 428 429 /// <summary> 430 /// <para> You usually don't need to modify this.</para> 431 /// <para> Pass -1 to use the default value for iHeartbeatInterval.</para> 432 /// <para> Some mods change this.</para> 433 /// </summary> 434 public static void SetHeartbeatInterval(int iHeartbeatInterval) { 435 InteropHelp.TestIfAvailableGameServer(); 436 NativeMethods.ISteamGameServer_SetHeartbeatInterval(CSteamGameServerAPIContext.GetSteamGameServer(), iHeartbeatInterval); 437 } 438 439 /// <summary> 440 /// <para> Force a heartbeat to steam at the next opportunity</para> 441 /// </summary> 442 public static void ForceHeartbeat() { 443 InteropHelp.TestIfAvailableGameServer(); 444 NativeMethods.ISteamGameServer_ForceHeartbeat(CSteamGameServerAPIContext.GetSteamGameServer()); 445 } 446 447 /// <summary> 448 /// <para> associate this game server with this clan for the purposes of computing player compat</para> 449 /// </summary> 450 public static SteamAPICall_t AssociateWithClan(CSteamID steamIDClan) { 451 InteropHelp.TestIfAvailableGameServer(); 452 return (SteamAPICall_t)NativeMethods.ISteamGameServer_AssociateWithClan(CSteamGameServerAPIContext.GetSteamGameServer(), steamIDClan); 453 } 454 455 /// <summary> 456 /// <para> ask if any of the current players dont want to play with this new player - or vice versa</para> 457 /// </summary> 458 public static SteamAPICall_t ComputeNewPlayerCompatibility(CSteamID steamIDNewPlayer) { 459 InteropHelp.TestIfAvailableGameServer(); 460 return (SteamAPICall_t)NativeMethods.ISteamGameServer_ComputeNewPlayerCompatibility(CSteamGameServerAPIContext.GetSteamGameServer(), steamIDNewPlayer); 461 } 462 } 463 } 464 465 #endif // !DISABLESTEAMWORKS