Facepunch.Steamworks Wiki

Steamworks.SteamServer

Provides the core of the Steam Game Servers API

Fields

static Action<System.Exception> OnCallbackException

Properties

Set heartbeat interval, if automatic heartbeats are enabled. You can leave this at the default.
static int AutomaticHeartbeatRate { set; }
Enable or disable heartbeats, which are sent regularly to the master server. Enabled by default.
static bool AutomaticHeartbeats { set; }
Gets or sets the current BotCount. This doesn't enforce any kind of limit, it just updates the master server.
static int BotCount { get; set; }
Sets whether this should be marked as a dedicated server. If not, it is assumed to be a listen server.
static bool DedicatedServer { get; set; }
Gets or sets the current Product
static string GameDescription { get; }
Gets or sets the current GameTags. This is a comma seperated list of tags for this server. When querying the server list you can filter by these tags.
static string GameTags { get; set; }
static bool IsValid { get; }
Returns true if the server is connected and registered with the Steam master server You should have called LogOnAnonymous etc on startup.
static bool LoggedOn { get; }
Gets or sets the current Map Name.
static string MapName { get; set; }
Gets or sets the current MaxPlayers. This doesn't enforce any kind of limit, it just updates the master server.
static int MaxPlayers { get; set; }
Gets or sets the current ModDir
static string ModDir { get; }
Set whether the server should report itself as passworded
static bool Passworded { get; set; }
Gets the current product
static string Product { get; }
To the best of its ability this tries to get the server's current public ip address. Be aware that this is likely to return null for the first few seconds after initialization.
static System.Net.IPAddress PublicIp { get; }
Gets or sets the current ServerName
static string ServerName { get; set; }

Methods

Start authorizing a ticket. This user isn't authorized yet. Wait for a call to OnAuthChange.
static bool BeginAuthSession( byte[] data, SteamId steamid );
Remove all key values
static void ClearKeys();
Forget this guy. They're no longer in the game.
static void EndSession( SteamId steamid );
Force send a heartbeat to the master server instead of waiting for the next automatic update (if you've left them enabled)
static void ForceHeartbeat();
If true, Steam wants to send a packet. You should respond by sending this packet in an unconnected way to the returned Address and Port.
static bool GetOutgoingPacket( Data.OutgoingPacket packet );
We have received a server query on our game port. Pass it to Steam to handle.
static void HandleIncomingPacket( System.IntPtr ptr, int size, uint address, ushort port );
Initialize the steam server. If asyncCallbacks is false you need to call RunCallbacks manually every frame.
static void Init( AppId appid, SteamServerInit init, bool asyncCallbacks = True );
Log onto Steam anonymously.
static void LogOff();
Log onto Steam anonymously.
static void LogOnAnonymous();
Run the callbacks. This is also called in Async callbacks.
static void RunCallbacks();
Sets a Key Value. These can be anything you like, and are accessible when querying servers from the server list. Information describing gamemodes are common here.
static void SetKey( string Key, string Value );
static void Shutdown();
Update this connected player's information. You should really call this any time a player's name or score changes. This keeps the information shown to server queries up to date.
static void UpdatePlayer( SteamId steamid, string name, int score );
Does the user own this app (which could be DLC)
static UserHasLicenseForAppResult UserHasLicenseForApp( SteamId steamid, AppId appid );

Page Links


Special Pages


Wikis

?

Render Time: 21ms

Session 0
DB GetPage 11
Generate Html 0
SaveChanges 7
Render Body 0
Render Sidebar 1