예제 #1
0
 /// <summary>
 /// <para> ask if any of the current players dont want to play with this new player - or vice versa</para>
 /// </summary>
 public static SteamAPICall_t ComputeNewPlayerCompatibility(CSteamID steamIDNewPlayer)
 {
     InteropHelp.TestIfAvailableGameServer();
     return((SteamAPICall_t)NativeMethods.ISteamGameServer_ComputeNewPlayerCompatibility(CSteamGameServerAPIContext.GetSteamGameServer(), steamIDNewPlayer));
 }
예제 #2
0
 /// <summary>
 /// <para>/ Begin process of logging game server out of steam</para>
 /// </summary>
 public static void LogOff()
 {
     InteropHelp.TestIfAvailableGameServer();
     NativeMethods.ISteamGameServer_LogOff(CSteamGameServerAPIContext.GetSteamGameServer());
 }
예제 #3
0
 /// <summary>
 /// <para> Control heartbeats / advertisement with master server</para>
 /// <para> Call this as often as you like to tell the master server updater whether or not</para>
 /// <para> you want it to be active (default: off).</para>
 /// </summary>
 public static void EnableHeartbeats(bool bActive)
 {
     InteropHelp.TestIfAvailableGameServer();
     NativeMethods.ISteamGameServer_EnableHeartbeats(CSteamGameServerAPIContext.GetSteamGameServer(), bActive);
 }
예제 #4
0
 /// <summary>
 /// <para> Force a heartbeat to steam at the next opportunity</para>
 /// </summary>
 public static void ForceHeartbeat()
 {
     InteropHelp.TestIfAvailableGameServer();
     NativeMethods.ISteamGameServer_ForceHeartbeat(CSteamGameServerAPIContext.GetSteamGameServer());
 }
예제 #5
0
 public static SteamAPICall_t GetServerReputation()
 {
     InteropHelp.TestIfAvailableGameServer();
     return((SteamAPICall_t)NativeMethods.ISteamGameServer_GetServerReputation(CSteamGameServerAPIContext.GetSteamGameServer()));
 }
예제 #6
0
 /// <summary>
 /// <para> These are in GameSocketShare mode, where instead of ISteamGameServer creating its own</para>
 /// <para> socket to talk to the master server on, it lets the game use its socket to forward messages</para>
 /// <para> back and forth. This prevents us from requiring server ops to open up yet another port</para>
 /// <para> in their firewalls.</para>
 /// <para> the IP address and port should be in host order, i.e 127.0.0.1 == 0x7f000001</para>
 /// <para> These are used when you've elected to multiplex the game server's UDP socket</para>
 /// <para> rather than having the master server updater use its own sockets.</para>
 /// <para> Source games use this to simplify the job of the server admins, so they</para>
 /// <para> don't have to open up more ports on their firewalls.</para>
 /// <para> Call this when a packet that starts with 0xFFFFFFFF comes in. That means</para>
 /// <para> it's for us.</para>
 /// </summary>
 public static bool HandleIncomingPacket(byte[] pData, int cbData, uint srcIP, ushort srcPort)
 {
     InteropHelp.TestIfAvailableGameServer();
     return(NativeMethods.ISteamGameServer_HandleIncomingPacket(CSteamGameServerAPIContext.GetSteamGameServer(), pData, cbData, srcIP, srcPort));
 }
예제 #7
0
 /// <summary>
 /// <para>/ Spectator server.  The default value is zero, meaning the service</para>
 /// <para>/ is not used.</para>
 /// </summary>
 public static void SetSpectatorPort(ushort unSpectatorPort)
 {
     InteropHelp.TestIfAvailableGameServer();
     NativeMethods.ISteamGameServer_SetSpectatorPort(CSteamGameServerAPIContext.GetSteamGameServer(), unSpectatorPort);
 }
예제 #8
0
 /// <summary>
 /// <para> Ask if a user in in the specified group, results returns async by GSUserGroupStatus_t</para>
 /// <para> returns false if we're not connected to the steam servers and thus cannot ask</para>
 /// </summary>
 public static bool RequestUserGroupStatus(CSteamID steamIDUser, CSteamID steamIDGroup)
 {
     InteropHelp.TestIfAvailableGameServer();
     return(NativeMethods.ISteamGameServer_RequestUserGroupStatus(CSteamGameServerAPIContext.GetSteamGameServer(), steamIDUser, steamIDGroup));
 }
예제 #9
0
 /// <summary>
 /// <para>/ Number of bots.  Default value is zero</para>
 /// </summary>
 public static void SetBotPlayerCount(int cBotplayers)
 {
     InteropHelp.TestIfAvailableGameServer();
     NativeMethods.ISteamGameServer_SetBotPlayerCount(CSteamGameServerAPIContext.GetSteamGameServer(), cBotplayers);
 }
예제 #10
0
 /// <summary>
 /// <para>/ Let people know if your server will require a password</para>
 /// </summary>
 public static void SetPasswordProtected(bool bPasswordProtected)
 {
     InteropHelp.TestIfAvailableGameServer();
     NativeMethods.ISteamGameServer_SetPasswordProtected(CSteamGameServerAPIContext.GetSteamGameServer(), bPasswordProtected);
 }
예제 #11
0
 /// <summary>
 /// <para>/ Returns true if the master server has requested a restart.</para>
 /// <para>/ Only returns true once per request.</para>
 /// </summary>
 public static bool WasRestartRequested()
 {
     InteropHelp.TestIfAvailableGameServer();
     return(NativeMethods.ISteamGameServer_WasRestartRequested(CSteamGameServerAPIContext.GetSteamGameServer()));
 }
예제 #12
0
 public static CSteamID GetSteamID()
 {
     InteropHelp.TestIfAvailableGameServer();
     return((CSteamID)NativeMethods.ISteamGameServer_GetSteamID(CSteamGameServerAPIContext.GetSteamGameServer()));
 }
예제 #13
0
 public static bool BSecure()
 {
     InteropHelp.TestIfAvailableGameServer();
     return(NativeMethods.ISteamGameServer_BSecure(CSteamGameServerAPIContext.GetSteamGameServer()));
 }
예제 #14
0
 /// <summary>
 /// <para> Cancel auth ticket from GetAuthSessionTicket, called when no longer playing game with the entity you gave the ticket to</para>
 /// </summary>
 public static void CancelAuthTicket(HAuthTicket hAuthTicket)
 {
     InteropHelp.TestIfAvailableGameServer();
     NativeMethods.ISteamGameServer_CancelAuthTicket(CSteamGameServerAPIContext.GetSteamGameServer(), hAuthTicket);
 }
예제 #15
0
 /// <summary>
 /// <para>/ Call this to clear the whole list of key/values that are sent in rules queries.</para>
 /// </summary>
 public static void ClearAllKeyValues()
 {
     InteropHelp.TestIfAvailableGameServer();
     NativeMethods.ISteamGameServer_ClearAllKeyValues(CSteamGameServerAPIContext.GetSteamGameServer());
 }
예제 #16
0
 /// <summary>
 /// <para> After receiving a user's authentication data, and passing it to SendUserConnectAndAuthenticate, use this function</para>
 /// <para> to determine if the user owns downloadable content specified by the provided AppID.</para>
 /// </summary>
 public static EUserHasLicenseForAppResult UserHasLicenseForApp(CSteamID steamID, AppId_t appID)
 {
     InteropHelp.TestIfAvailableGameServer();
     return(NativeMethods.ISteamGameServer_UserHasLicenseForApp(CSteamGameServerAPIContext.GetSteamGameServer(), steamID, appID));
 }
예제 #17
0
 /// <summary>
 /// <para> Player list management / authentication</para>
 /// <para> Handles receiving a new connection from a Steam user.  This call will ask the Steam</para>
 /// <para> servers to validate the users identity, app ownership, and VAC status.  If the Steam servers</para>
 /// <para> are off-line, then it will validate the cached ticket itself which will validate app ownership</para>
 /// <para> and identity.  The AuthBlob here should be acquired on the game client using SteamUser()-&gt;InitiateGameConnection()</para>
 /// <para> and must then be sent up to the game server for authentication.</para>
 /// <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>
 /// <para> If the call succeeds then you should expect a GSClientApprove_t or GSClientDeny_t callback which will tell you whether authentication</para>
 /// <para> for the user has succeeded or failed (the steamid in the callback will match the one returned by this call)</para>
 /// </summary>
 public static bool SendUserConnectAndAuthenticate(uint unIPClient, byte[] pvAuthBlob, uint cubAuthBlobSize, out CSteamID pSteamIDUser)
 {
     InteropHelp.TestIfAvailableGameServer();
     return(NativeMethods.ISteamGameServer_SendUserConnectAndAuthenticate(CSteamGameServerAPIContext.GetSteamGameServer(), unIPClient, pvAuthBlob, cubAuthBlobSize, out pSteamIDUser));
 }
예제 #18
0
 /// <summary>
 /// <para> these two functions s are deprecated, and will not return results</para>
 /// <para> they will be removed in a future version of the SDK</para>
 /// </summary>
 public static void GetGameplayStats()
 {
     InteropHelp.TestIfAvailableGameServer();
     NativeMethods.ISteamGameServer_GetGameplayStats(CSteamGameServerAPIContext.GetSteamGameServer());
 }
예제 #19
0
 /// <summary>
 /// <para> Creates a fake user (ie, a bot) which will be listed as playing on the server, but skips validation.</para>
 /// <para> Return Value: Returns a SteamID for the user to be tracked with, you should call HandleUserDisconnect()</para>
 /// <para> when this user leaves the server just like you would for a real user.</para>
 /// </summary>
 public static CSteamID CreateUnauthenticatedUserConnection()
 {
     InteropHelp.TestIfAvailableGameServer();
     return((CSteamID)NativeMethods.ISteamGameServer_CreateUnauthenticatedUserConnection(CSteamGameServerAPIContext.GetSteamGameServer()));
 }
예제 #20
0
 /// <summary>
 /// <para> Returns the public IP of the server according to Steam, useful when the server is</para>
 /// <para> behind NAT and you want to advertise its IP in a lobby for other clients to directly</para>
 /// <para> connect to</para>
 /// </summary>
 public static SteamIPAddress_t GetPublicIP()
 {
     InteropHelp.TestIfAvailableGameServer();
     return(NativeMethods.ISteamGameServer_GetPublicIP(CSteamGameServerAPIContext.GetSteamGameServer()));
 }
예제 #21
0
 /// <summary>
 /// <para> Should be called whenever a user leaves our game server, this lets Steam internally</para>
 /// <para> track which users are currently on which servers for the purposes of preventing a single</para>
 /// <para> account being logged into multiple servers, showing who is currently on a server, etc.</para>
 /// </summary>
 public static void SendUserDisconnect(CSteamID steamIDUser)
 {
     InteropHelp.TestIfAvailableGameServer();
     NativeMethods.ISteamGameServer_SendUserDisconnect(CSteamGameServerAPIContext.GetSteamGameServer(), steamIDUser);
 }
예제 #22
0
 /// <summary>
 /// <para> AFTER calling HandleIncomingPacket for any packets that came in that frame, call this.</para>
 /// <para> This gets a packet that the master server updater needs to send out on UDP.</para>
 /// <para> It returns the length of the packet it wants to send, or 0 if there are no more packets to send.</para>
 /// <para> Call this each frame until it returns 0.</para>
 /// </summary>
 public static int GetNextOutgoingPacket(byte[] pOut, int cbMaxOut, out uint pNetAdr, out ushort pPort)
 {
     InteropHelp.TestIfAvailableGameServer();
     return(NativeMethods.ISteamGameServer_GetNextOutgoingPacket(CSteamGameServerAPIContext.GetSteamGameServer(), pOut, cbMaxOut, out pNetAdr, out pPort));
 }
예제 #23
0
 /// <summary>
 /// <para> New auth system APIs - do not mix with the old auth system APIs.</para>
 /// <para> ----------------------------------------------------------------</para>
 /// <para> Retrieve ticket to be sent to the entity who wishes to authenticate you ( using BeginAuthSession API ).</para>
 /// <para> pcbTicket retrieves the length of the actual ticket.</para>
 /// </summary>
 public static HAuthTicket GetAuthSessionTicket(byte[] pTicket, int cbMaxTicket, out uint pcbTicket)
 {
     InteropHelp.TestIfAvailableGameServer();
     return((HAuthTicket)NativeMethods.ISteamGameServer_GetAuthSessionTicket(CSteamGameServerAPIContext.GetSteamGameServer(), pTicket, cbMaxTicket, out pcbTicket));
 }
예제 #24
0
 /// <summary>
 /// <para> You usually don't need to modify this.</para>
 /// <para> Pass -1 to use the default value for iHeartbeatInterval.</para>
 /// <para> Some mods change this.</para>
 /// </summary>
 public static void SetHeartbeatInterval(int iHeartbeatInterval)
 {
     InteropHelp.TestIfAvailableGameServer();
     NativeMethods.ISteamGameServer_SetHeartbeatInterval(CSteamGameServerAPIContext.GetSteamGameServer(), iHeartbeatInterval);
 }
예제 #25
0
 /// <summary>
 /// <para> Authenticate ticket ( from GetAuthSessionTicket ) from entity steamID to be sure it is valid and isnt reused</para>
 /// <para> Registers for callbacks if the entity goes offline or cancels the ticket ( see ValidateAuthTicketResponse_t callback and EAuthSessionResponse )</para>
 /// </summary>
 public static EBeginAuthSessionResult BeginAuthSession(byte[] pAuthTicket, int cbAuthTicket, CSteamID steamID)
 {
     InteropHelp.TestIfAvailableGameServer();
     return(NativeMethods.ISteamGameServer_BeginAuthSession(CSteamGameServerAPIContext.GetSteamGameServer(), pAuthTicket, cbAuthTicket, steamID));
 }
예제 #26
0
 /// <summary>
 /// <para> associate this game server with this clan for the purposes of computing player compat</para>
 /// </summary>
 public static SteamAPICall_t AssociateWithClan(CSteamID steamIDClan)
 {
     InteropHelp.TestIfAvailableGameServer();
     return((SteamAPICall_t)NativeMethods.ISteamGameServer_AssociateWithClan(CSteamGameServerAPIContext.GetSteamGameServer(), steamIDClan));
 }
예제 #27
0
 /// <summary>
 /// <para> Stop tracking started by BeginAuthSession - called when no longer playing game with this entity</para>
 /// </summary>
 public static void EndAuthSession(CSteamID steamID)
 {
     InteropHelp.TestIfAvailableGameServer();
     NativeMethods.ISteamGameServer_EndAuthSession(CSteamGameServerAPIContext.GetSteamGameServer(), steamID);
 }
예제 #28
0
 /// <summary>
 /// <para>/ Is this is a dedicated server?  The default value is false.</para>
 /// </summary>
 public static void SetDedicatedServer(bool bDedicated)
 {
     InteropHelp.TestIfAvailableGameServer();
     NativeMethods.ISteamGameServer_SetDedicatedServer(CSteamGameServerAPIContext.GetSteamGameServer(), bDedicated);
 }
 /// <summary>
 /// <para>/ Indicate whether you wish to be listed on the master server list</para>
 /// <para>/ and/or respond to server browser / LAN discovery packets.</para>
 /// <para>/ The server starts with this value set to false.  You should set all</para>
 /// <para>/ relevant server parameters before enabling advertisement on the server.</para>
 /// <para>/</para>
 /// <para>/ (This function used to be named EnableHeartbeats, so if you are wondering</para>
 /// <para>/ where that function went, it's right here.  It does the same thing as before,</para>
 /// <para>/ the old name was just confusing.)</para>
 /// </summary>
 public static void SetAdvertiseServerActive(bool bActive)
 {
     InteropHelp.TestIfAvailableGameServer();
     NativeMethods.ISteamGameServer_SetAdvertiseServerActive(CSteamGameServerAPIContext.GetSteamGameServer(), bActive);
 }