Class SteamGameServerClient
Purpose: Interface to creating a new steam instance, or to connect to an existing steam instance, whether it's in a different process or is local. For most scenarios this is all handled automatically via SteamAPI_Init(). You'll only need these APIs if you have a more complex versioning scheme, or if you want to implement a multiplexed gameserver where a single process is handling multiple games at once with independent gameserver SteamIDs.
Inherited Members
Namespace: Unity.Steamworks.Interop
Assembly: Unity.Steamworks.Interop.dll
Syntax
public static class SteamGameServerClient
Methods
BReleaseSteamPipe(HSteamPipe)
Releases a previously created communications pipe NOT THREADSAFE - ensure that no other threads are accessing Steamworks API when calling
Declaration
public static bool BReleaseSteamPipe(HSteamPipe hSteamPipe)
Parameters
| Type | Name | Description |
|---|---|---|
| HSteamPipe | hSteamPipe | Passed through to |
Returns
| Type | Description |
|---|---|
| bool | The value |
BShutdownIfAllPipesClosed()
Trigger global shutdown for the DLL
Declaration
public static bool BShutdownIfAllPipesClosed()
Returns
| Type | Description |
|---|---|
| bool | The value |
ConnectToGlobalUser(HSteamPipe)
connects to an existing global user, failing if none exists used by the game to coordinate with the steamUI NOT THREADSAFE - ensure that no other threads are accessing Steamworks API when calling
Declaration
public static HSteamUser ConnectToGlobalUser(HSteamPipe hSteamPipe)
Parameters
| Type | Name | Description |
|---|---|---|
| HSteamPipe | hSteamPipe | Passed through to |
Returns
| Type | Description |
|---|---|
| HSteamUser | The value |
CreateLocalUser(out HSteamPipe, EAccountType)
used by game servers, create a steam user that won't be shared with anyone else NOT THREADSAFE - ensure that no other threads are accessing Steamworks API when calling
Declaration
public static HSteamUser CreateLocalUser(out HSteamPipe phSteamPipe, EAccountType eAccountType)
Parameters
| Type | Name | Description |
|---|---|---|
| HSteamPipe | phSteamPipe | Passed through to |
| EAccountType | eAccountType | Passed through to |
Returns
| Type | Description |
|---|---|
| HSteamUser | The value |
CreateSteamPipe()
Creates a communication pipe to the Steam client. NOT THREADSAFE - ensure that no other threads are accessing Steamworks API when calling
Declaration
public static HSteamPipe CreateSteamPipe()
Returns
| Type | Description |
|---|---|
| HSteamPipe | The value |
GetIPCCallCount()
returns the number of IPC calls made since the last time this function was called Used for perf debugging so you can understand how many IPC calls your game makes per frame Every IPC call is at minimum a thread context switch if not a process one so you want to rate control how often you do them.
Declaration
public static uint GetIPCCallCount()
Returns
| Type | Description |
|---|---|
| uint | The value |
GetISteamApps(HSteamUser, HSteamPipe, string)
returns apps interface
Declaration
public static IntPtr GetISteamApps(HSteamUser hSteamUser, HSteamPipe hSteamPipe, string pchVersion)
Parameters
| Type | Name | Description |
|---|---|---|
| HSteamUser | hSteamUser | Passed through to |
| HSteamPipe | hSteamPipe | Passed through to |
| string | pchVersion | Passed through to |
Returns
| Type | Description |
|---|---|
| IntPtr | The value |
GetISteamController(HSteamUser, HSteamPipe, string)
Exposes the ISteamController interface - deprecated in favor of Steam Input
Declaration
public static IntPtr GetISteamController(HSteamUser hSteamUser, HSteamPipe hSteamPipe, string pchVersion)
Parameters
| Type | Name | Description |
|---|---|---|
| HSteamUser | hSteamUser | Passed through to |
| HSteamPipe | hSteamPipe | Passed through to |
| string | pchVersion | Passed through to |
Returns
| Type | Description |
|---|---|
| IntPtr | The value |
GetISteamFriends(HSteamUser, HSteamPipe, string)
returns the ISteamFriends interface
Declaration
public static IntPtr GetISteamFriends(HSteamUser hSteamUser, HSteamPipe hSteamPipe, string pchVersion)
Parameters
| Type | Name | Description |
|---|---|---|
| HSteamUser | hSteamUser | Passed through to |
| HSteamPipe | hSteamPipe | Passed through to |
| string | pchVersion | Passed through to |
Returns
| Type | Description |
|---|---|
| IntPtr | The value |
GetISteamGameServer(HSteamUser, HSteamPipe, string)
retrieves the ISteamGameServer interface associated with the handle
Declaration
public static IntPtr GetISteamGameServer(HSteamUser hSteamUser, HSteamPipe hSteamPipe, string pchVersion)
Parameters
| Type | Name | Description |
|---|---|---|
| HSteamUser | hSteamUser | Passed through to |
| HSteamPipe | hSteamPipe | Passed through to |
| string | pchVersion | Passed through to |
Returns
| Type | Description |
|---|---|
| IntPtr | The value |
GetISteamGameServerStats(HSteamUser, HSteamPipe, string)
returns the ISteamGameServerStats interface
Declaration
public static IntPtr GetISteamGameServerStats(HSteamUser hSteamuser, HSteamPipe hSteamPipe, string pchVersion)
Parameters
| Type | Name | Description |
|---|---|---|
| HSteamUser | hSteamuser | Passed through to |
| HSteamPipe | hSteamPipe | Passed through to |
| string | pchVersion | Passed through to |
Returns
| Type | Description |
|---|---|
| IntPtr | The value |
GetISteamGenericInterface(HSteamUser, HSteamPipe, string)
returns the a generic interface
Declaration
public static IntPtr GetISteamGenericInterface(HSteamUser hSteamUser, HSteamPipe hSteamPipe, string pchVersion)
Parameters
| Type | Name | Description |
|---|---|---|
| HSteamUser | hSteamUser | Passed through to |
| HSteamPipe | hSteamPipe | Passed through to |
| string | pchVersion | Passed through to |
Returns
| Type | Description |
|---|---|
| IntPtr | The value |
GetISteamHTMLSurface(HSteamUser, HSteamPipe, string)
html page display
Declaration
public static IntPtr GetISteamHTMLSurface(HSteamUser hSteamuser, HSteamPipe hSteamPipe, string pchVersion)
Parameters
| Type | Name | Description |
|---|---|---|
| HSteamUser | hSteamuser | Passed through to |
| HSteamPipe | hSteamPipe | Passed through to |
| string | pchVersion | Passed through to |
Returns
| Type | Description |
|---|---|
| IntPtr | The value |
GetISteamHTTP(HSteamUser, HSteamPipe, string)
Expose HTTP interface
Declaration
public static IntPtr GetISteamHTTP(HSteamUser hSteamuser, HSteamPipe hSteamPipe, string pchVersion)
Parameters
| Type | Name | Description |
|---|---|---|
| HSteamUser | hSteamuser | Passed through to |
| HSteamPipe | hSteamPipe | Passed through to |
| string | pchVersion | Passed through to |
Returns
| Type | Description |
|---|---|
| IntPtr | The value |
GetISteamInput(HSteamUser, HSteamPipe, string)
Exposes the Steam Input interface for controller support
Declaration
public static IntPtr GetISteamInput(HSteamUser hSteamUser, HSteamPipe hSteamPipe, string pchVersion)
Parameters
| Type | Name | Description |
|---|---|---|
| HSteamUser | hSteamUser | Passed through to |
| HSteamPipe | hSteamPipe | Passed through to |
| string | pchVersion | Passed through to |
Returns
| Type | Description |
|---|---|
| IntPtr | The value |
GetISteamInventory(HSteamUser, HSteamPipe, string)
inventory
Declaration
public static IntPtr GetISteamInventory(HSteamUser hSteamuser, HSteamPipe hSteamPipe, string pchVersion)
Parameters
| Type | Name | Description |
|---|---|---|
| HSteamUser | hSteamuser | Passed through to |
| HSteamPipe | hSteamPipe | Passed through to |
| string | pchVersion | Passed through to |
Returns
| Type | Description |
|---|---|
| IntPtr | The value |
GetISteamMatchmaking(HSteamUser, HSteamPipe, string)
returns the ISteamMatchmaking interface
Declaration
public static IntPtr GetISteamMatchmaking(HSteamUser hSteamUser, HSteamPipe hSteamPipe, string pchVersion)
Parameters
| Type | Name | Description |
|---|---|---|
| HSteamUser | hSteamUser | Passed through to |
| HSteamPipe | hSteamPipe | Passed through to |
| string | pchVersion | Passed through to |
Returns
| Type | Description |
|---|---|
| IntPtr | The value |
GetISteamMatchmakingServers(HSteamUser, HSteamPipe, string)
returns the ISteamMatchmakingServers interface
Declaration
public static IntPtr GetISteamMatchmakingServers(HSteamUser hSteamUser, HSteamPipe hSteamPipe, string pchVersion)
Parameters
| Type | Name | Description |
|---|---|---|
| HSteamUser | hSteamUser | Passed through to |
| HSteamPipe | hSteamPipe | Passed through to |
| string | pchVersion | Passed through to |
Returns
| Type | Description |
|---|---|
| IntPtr | The value |
GetISteamMusic(HSteamUser, HSteamPipe, string)
Music Player
Declaration
public static IntPtr GetISteamMusic(HSteamUser hSteamuser, HSteamPipe hSteamPipe, string pchVersion)
Parameters
| Type | Name | Description |
|---|---|---|
| HSteamUser | hSteamuser | Passed through to |
| HSteamPipe | hSteamPipe | Passed through to |
| string | pchVersion | Passed through to |
Returns
| Type | Description |
|---|---|
| IntPtr | The value |
GetISteamNetworking(HSteamUser, HSteamPipe, string)
networking
Declaration
public static IntPtr GetISteamNetworking(HSteamUser hSteamUser, HSteamPipe hSteamPipe, string pchVersion)
Parameters
| Type | Name | Description |
|---|---|---|
| HSteamUser | hSteamUser | Passed through to |
| HSteamPipe | hSteamPipe | Passed through to |
| string | pchVersion | Passed through to |
Returns
| Type | Description |
|---|---|
| IntPtr | The value |
GetISteamParentalSettings(HSteamUser, HSteamPipe, string)
Parental controls
Declaration
public static IntPtr GetISteamParentalSettings(HSteamUser hSteamuser, HSteamPipe hSteamPipe, string pchVersion)
Parameters
| Type | Name | Description |
|---|---|---|
| HSteamUser | hSteamuser | Passed through to |
| HSteamPipe | hSteamPipe | Passed through to |
| string | pchVersion | Passed through to |
Returns
| Type | Description |
|---|---|
| IntPtr | The value |
GetISteamParties(HSteamUser, HSteamPipe, string)
Steam Parties interface
Declaration
public static IntPtr GetISteamParties(HSteamUser hSteamUser, HSteamPipe hSteamPipe, string pchVersion)
Parameters
| Type | Name | Description |
|---|---|---|
| HSteamUser | hSteamUser | Passed through to |
| HSteamPipe | hSteamPipe | Passed through to |
| string | pchVersion | Passed through to |
Returns
| Type | Description |
|---|---|
| IntPtr | The value |
GetISteamRemotePlay(HSteamUser, HSteamPipe, string)
Steam Remote Play interface
Declaration
public static IntPtr GetISteamRemotePlay(HSteamUser hSteamUser, HSteamPipe hSteamPipe, string pchVersion)
Parameters
| Type | Name | Description |
|---|---|---|
| HSteamUser | hSteamUser | Passed through to |
| HSteamPipe | hSteamPipe | Passed through to |
| string | pchVersion | Passed through to |
Returns
| Type | Description |
|---|---|
| IntPtr | The value |
GetISteamRemoteStorage(HSteamUser, HSteamPipe, string)
remote storage
Declaration
public static IntPtr GetISteamRemoteStorage(HSteamUser hSteamuser, HSteamPipe hSteamPipe, string pchVersion)
Parameters
| Type | Name | Description |
|---|---|---|
| HSteamUser | hSteamuser | Passed through to |
| HSteamPipe | hSteamPipe | Passed through to |
| string | pchVersion | Passed through to |
Returns
| Type | Description |
|---|---|
| IntPtr | The value |
GetISteamScreenshots(HSteamUser, HSteamPipe, string)
user screenshots
Declaration
public static IntPtr GetISteamScreenshots(HSteamUser hSteamuser, HSteamPipe hSteamPipe, string pchVersion)
Parameters
| Type | Name | Description |
|---|---|---|
| HSteamUser | hSteamuser | Passed through to |
| HSteamPipe | hSteamPipe | Passed through to |
| string | pchVersion | Passed through to |
Returns
| Type | Description |
|---|---|
| IntPtr | The value |
GetISteamUGC(HSteamUser, HSteamPipe, string)
Exposes the ISteamUGC interface
Declaration
public static IntPtr GetISteamUGC(HSteamUser hSteamUser, HSteamPipe hSteamPipe, string pchVersion)
Parameters
| Type | Name | Description |
|---|---|---|
| HSteamUser | hSteamUser | Passed through to |
| HSteamPipe | hSteamPipe | Passed through to |
| string | pchVersion | Passed through to |
Returns
| Type | Description |
|---|---|
| IntPtr | The value |
GetISteamUser(HSteamUser, HSteamPipe, string)
retrieves the ISteamUser interface associated with the handle
Declaration
public static IntPtr GetISteamUser(HSteamUser hSteamUser, HSteamPipe hSteamPipe, string pchVersion)
Parameters
| Type | Name | Description |
|---|---|---|
| HSteamUser | hSteamUser | Passed through to |
| HSteamPipe | hSteamPipe | Passed through to |
| string | pchVersion | Passed through to |
Returns
| Type | Description |
|---|---|
| IntPtr | The value |
GetISteamUserStats(HSteamUser, HSteamPipe, string)
returns the ISteamUserStats interface
Declaration
public static IntPtr GetISteamUserStats(HSteamUser hSteamUser, HSteamPipe hSteamPipe, string pchVersion)
Parameters
| Type | Name | Description |
|---|---|---|
| HSteamUser | hSteamUser | Passed through to |
| HSteamPipe | hSteamPipe | Passed through to |
| string | pchVersion | Passed through to |
Returns
| Type | Description |
|---|---|
| IntPtr | The value |
GetISteamUtils(HSteamPipe, string)
returns the ISteamUtils interface
Declaration
public static IntPtr GetISteamUtils(HSteamPipe hSteamPipe, string pchVersion)
Parameters
| Type | Name | Description |
|---|---|---|
| HSteamPipe | hSteamPipe | Passed through to |
| string | pchVersion | Passed through to |
Returns
| Type | Description |
|---|---|
| IntPtr | The value |
GetISteamVideo(HSteamUser, HSteamPipe, string)
Video
Declaration
public static IntPtr GetISteamVideo(HSteamUser hSteamuser, HSteamPipe hSteamPipe, string pchVersion)
Parameters
| Type | Name | Description |
|---|---|---|
| HSteamUser | hSteamuser | Passed through to |
| HSteamPipe | hSteamPipe | Passed through to |
| string | pchVersion | Passed through to |
Returns
| Type | Description |
|---|---|
| IntPtr | The value |
ReleaseUser(HSteamPipe, HSteamUser)
removes an allocated user NOT THREADSAFE - ensure that no other threads are accessing Steamworks API when calling
Declaration
public static void ReleaseUser(HSteamPipe hSteamPipe, HSteamUser hUser)
Parameters
| Type | Name | Description |
|---|---|---|
| HSteamPipe | hSteamPipe | Passed through to |
| HSteamUser | hUser | Passed through to |
SetLocalIPBinding(ref SteamIPAddress_t, ushort)
set the local IP and Port to bind to this must be set before CreateLocalUser()
Declaration
public static void SetLocalIPBinding(ref SteamIPAddress_t unIP, ushort usPort)
Parameters
| Type | Name | Description |
|---|---|---|
| SteamIPAddress_t | unIP | Passed through to |
| ushort | usPort | Passed through to |
SetWarningMessageHook(SteamAPIWarningMessageHook_t)
API warning handling 'int' is the severity; 0 for msg, 1 for warning 'const char *' is the text of the message callbacks will occur directly after the API function is called that generated the warning or message.
Declaration
public static void SetWarningMessageHook(SteamAPIWarningMessageHook_t pFunction)
Parameters
| Type | Name | Description |
|---|---|---|
| SteamAPIWarningMessageHook_t | pFunction | Passed through to |