C# Class Steamworks.SteamClient

Show file Open project: rlabrecque/Steamworks.NET Class Usage Examples

Public Methods

Method Description
BReleaseSteamPipe ( HSteamPipe hSteamPipe ) : bool

Releases a previously created communications pipe

NOT THREADSAFE - ensure that no other threads are accessing Steamworks API when calling

BShutdownIfAllPipesClosed ( ) : bool

Trigger global shutdown for the DLL

ConnectToGlobalUser ( HSteamPipe hSteamPipe ) : HSteamUser

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

CreateLocalUser ( HSteamPipe &phSteamPipe, EAccountType eAccountType ) : HSteamUser

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

CreateSteamPipe ( ) : HSteamPipe

Creates a communication pipe to the Steam client.

NOT THREADSAFE - ensure that no other threads are accessing Steamworks API when calling

GetIPCCallCount ( ) : uint

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.

GetISteamAppList ( HSteamUser hSteamUser, HSteamPipe hSteamPipe, string pchVersion ) : IntPtr

returns app list interface, only available on specially registered apps

GetISteamApps ( HSteamUser hSteamUser, HSteamPipe hSteamPipe, string pchVersion ) : IntPtr

returns apps interface

GetISteamController ( HSteamUser hSteamUser, HSteamPipe hSteamPipe, string pchVersion ) : IntPtr

Exposes the ISteamController interface

GetISteamFriends ( HSteamUser hSteamUser, HSteamPipe hSteamPipe, string pchVersion ) : IntPtr

returns the ISteamFriends interface

GetISteamGameServer ( HSteamUser hSteamUser, HSteamPipe hSteamPipe, string pchVersion ) : IntPtr

retrieves the ISteamGameServer interface associated with the handle

GetISteamGameServerStats ( HSteamUser hSteamuser, HSteamPipe hSteamPipe, string pchVersion ) : IntPtr

returns the ISteamGameServerStats interface

GetISteamGenericInterface ( HSteamUser hSteamUser, HSteamPipe hSteamPipe, string pchVersion ) : IntPtr

returns the a generic interface

GetISteamHTMLSurface ( HSteamUser hSteamuser, HSteamPipe hSteamPipe, string pchVersion ) : IntPtr

html page display

GetISteamHTTP ( HSteamUser hSteamuser, HSteamPipe hSteamPipe, string pchVersion ) : IntPtr

Expose HTTP interface

GetISteamInventory ( HSteamUser hSteamuser, HSteamPipe hSteamPipe, string pchVersion ) : IntPtr

inventory

GetISteamMatchmaking ( HSteamUser hSteamUser, HSteamPipe hSteamPipe, string pchVersion ) : IntPtr

returns the ISteamMatchmaking interface

GetISteamMatchmakingServers ( HSteamUser hSteamUser, HSteamPipe hSteamPipe, string pchVersion ) : IntPtr

returns the ISteamMatchmakingServers interface

GetISteamMusic ( HSteamUser hSteamuser, HSteamPipe hSteamPipe, string pchVersion ) : IntPtr

Music Player

GetISteamMusicRemote ( HSteamUser hSteamuser, HSteamPipe hSteamPipe, string pchVersion ) : IntPtr

Music Player Remote

GetISteamNetworking ( HSteamUser hSteamUser, HSteamPipe hSteamPipe, string pchVersion ) : IntPtr

networking

GetISteamRemoteStorage ( HSteamUser hSteamuser, HSteamPipe hSteamPipe, string pchVersion ) : IntPtr

remote storage

GetISteamScreenshots ( HSteamUser hSteamuser, HSteamPipe hSteamPipe, string pchVersion ) : IntPtr

user screenshots

GetISteamUGC ( HSteamUser hSteamUser, HSteamPipe hSteamPipe, string pchVersion ) : IntPtr

Exposes the ISteamUGC interface

GetISteamUnifiedMessages ( HSteamUser hSteamuser, HSteamPipe hSteamPipe, string pchVersion ) : IntPtr

Exposes the ISteamUnifiedMessages interface

GetISteamUser ( HSteamUser hSteamUser, HSteamPipe hSteamPipe, string pchVersion ) : IntPtr

retrieves the ISteamUser interface associated with the handle

GetISteamUserStats ( HSteamUser hSteamUser, HSteamPipe hSteamPipe, string pchVersion ) : IntPtr

returns the ISteamUserStats interface

GetISteamUtils ( HSteamPipe hSteamPipe, string pchVersion ) : IntPtr

returns the ISteamUtils interface

GetISteamVideo ( HSteamUser hSteamuser, HSteamPipe hSteamPipe, string pchVersion ) : IntPtr

Video

ReleaseUser ( HSteamPipe hSteamPipe, HSteamUser hUser ) : void

removes an allocated user

NOT THREADSAFE - ensure that no other threads are accessing Steamworks API when calling

SetLocalIPBinding ( uint unIP, ushort usPort ) : void

set the local IP and Port to bind to

this must be set before CreateLocalUser()

SetWarningMessageHook ( SteamAPIWarningMessageHook_t pFunction ) : void

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.

Method Details

BReleaseSteamPipe() public static method

Releases a previously created communications pipe

NOT THREADSAFE - ensure that no other threads are accessing Steamworks API when calling

public static BReleaseSteamPipe ( HSteamPipe hSteamPipe ) : bool
hSteamPipe HSteamPipe
return bool

BShutdownIfAllPipesClosed() public static method

Trigger global shutdown for the DLL

public static BShutdownIfAllPipesClosed ( ) : bool
return bool

ConnectToGlobalUser() public static method

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

public static ConnectToGlobalUser ( HSteamPipe hSteamPipe ) : HSteamUser
hSteamPipe HSteamPipe
return HSteamUser

CreateLocalUser() public static method

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

public static CreateLocalUser ( HSteamPipe &phSteamPipe, EAccountType eAccountType ) : HSteamUser
phSteamPipe HSteamPipe
eAccountType EAccountType
return HSteamUser

CreateSteamPipe() public static method

Creates a communication pipe to the Steam client.

NOT THREADSAFE - ensure that no other threads are accessing Steamworks API when calling

public static CreateSteamPipe ( ) : HSteamPipe
return HSteamPipe

GetIPCCallCount() public static method

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.

public static GetIPCCallCount ( ) : uint
return uint

GetISteamAppList() public static method

returns app list interface, only available on specially registered apps

public static GetISteamAppList ( HSteamUser hSteamUser, HSteamPipe hSteamPipe, string pchVersion ) : IntPtr
hSteamUser HSteamUser
hSteamPipe HSteamPipe
pchVersion string
return System.IntPtr

GetISteamApps() public static method

returns apps interface

public static GetISteamApps ( HSteamUser hSteamUser, HSteamPipe hSteamPipe, string pchVersion ) : IntPtr
hSteamUser HSteamUser
hSteamPipe HSteamPipe
pchVersion string
return System.IntPtr

GetISteamController() public static method

Exposes the ISteamController interface

public static GetISteamController ( HSteamUser hSteamUser, HSteamPipe hSteamPipe, string pchVersion ) : IntPtr
hSteamUser HSteamUser
hSteamPipe HSteamPipe
pchVersion string
return System.IntPtr

GetISteamFriends() public static method

returns the ISteamFriends interface

public static GetISteamFriends ( HSteamUser hSteamUser, HSteamPipe hSteamPipe, string pchVersion ) : IntPtr
hSteamUser HSteamUser
hSteamPipe HSteamPipe
pchVersion string
return System.IntPtr

GetISteamGameServer() public static method

retrieves the ISteamGameServer interface associated with the handle

public static GetISteamGameServer ( HSteamUser hSteamUser, HSteamPipe hSteamPipe, string pchVersion ) : IntPtr
hSteamUser HSteamUser
hSteamPipe HSteamPipe
pchVersion string
return System.IntPtr

GetISteamGameServerStats() public static method

returns the ISteamGameServerStats interface

public static GetISteamGameServerStats ( HSteamUser hSteamuser, HSteamPipe hSteamPipe, string pchVersion ) : IntPtr
hSteamuser HSteamUser
hSteamPipe HSteamPipe
pchVersion string
return System.IntPtr

GetISteamGenericInterface() public static method

returns the a generic interface

public static GetISteamGenericInterface ( HSteamUser hSteamUser, HSteamPipe hSteamPipe, string pchVersion ) : IntPtr
hSteamUser HSteamUser
hSteamPipe HSteamPipe
pchVersion string
return System.IntPtr

GetISteamHTMLSurface() public static method

html page display

public static GetISteamHTMLSurface ( HSteamUser hSteamuser, HSteamPipe hSteamPipe, string pchVersion ) : IntPtr
hSteamuser HSteamUser
hSteamPipe HSteamPipe
pchVersion string
return System.IntPtr

GetISteamHTTP() public static method

Expose HTTP interface

public static GetISteamHTTP ( HSteamUser hSteamuser, HSteamPipe hSteamPipe, string pchVersion ) : IntPtr
hSteamuser HSteamUser
hSteamPipe HSteamPipe
pchVersion string
return System.IntPtr

GetISteamInventory() public static method

inventory

public static GetISteamInventory ( HSteamUser hSteamuser, HSteamPipe hSteamPipe, string pchVersion ) : IntPtr
hSteamuser HSteamUser
hSteamPipe HSteamPipe
pchVersion string
return System.IntPtr

GetISteamMatchmaking() public static method

returns the ISteamMatchmaking interface

public static GetISteamMatchmaking ( HSteamUser hSteamUser, HSteamPipe hSteamPipe, string pchVersion ) : IntPtr
hSteamUser HSteamUser
hSteamPipe HSteamPipe
pchVersion string
return System.IntPtr

GetISteamMatchmakingServers() public static method

returns the ISteamMatchmakingServers interface

public static GetISteamMatchmakingServers ( HSteamUser hSteamUser, HSteamPipe hSteamPipe, string pchVersion ) : IntPtr
hSteamUser HSteamUser
hSteamPipe HSteamPipe
pchVersion string
return System.IntPtr

GetISteamMusic() public static method

Music Player

public static GetISteamMusic ( HSteamUser hSteamuser, HSteamPipe hSteamPipe, string pchVersion ) : IntPtr
hSteamuser HSteamUser
hSteamPipe HSteamPipe
pchVersion string
return System.IntPtr

GetISteamMusicRemote() public static method

Music Player Remote

public static GetISteamMusicRemote ( HSteamUser hSteamuser, HSteamPipe hSteamPipe, string pchVersion ) : IntPtr
hSteamuser HSteamUser
hSteamPipe HSteamPipe
pchVersion string
return System.IntPtr

GetISteamNetworking() public static method

networking

public static GetISteamNetworking ( HSteamUser hSteamUser, HSteamPipe hSteamPipe, string pchVersion ) : IntPtr
hSteamUser HSteamUser
hSteamPipe HSteamPipe
pchVersion string
return System.IntPtr

GetISteamRemoteStorage() public static method

remote storage

public static GetISteamRemoteStorage ( HSteamUser hSteamuser, HSteamPipe hSteamPipe, string pchVersion ) : IntPtr
hSteamuser HSteamUser
hSteamPipe HSteamPipe
pchVersion string
return System.IntPtr

GetISteamScreenshots() public static method

user screenshots

public static GetISteamScreenshots ( HSteamUser hSteamuser, HSteamPipe hSteamPipe, string pchVersion ) : IntPtr
hSteamuser HSteamUser
hSteamPipe HSteamPipe
pchVersion string
return System.IntPtr

GetISteamUGC() public static method

Exposes the ISteamUGC interface

public static GetISteamUGC ( HSteamUser hSteamUser, HSteamPipe hSteamPipe, string pchVersion ) : IntPtr
hSteamUser HSteamUser
hSteamPipe HSteamPipe
pchVersion string
return System.IntPtr

GetISteamUnifiedMessages() public static method

Exposes the ISteamUnifiedMessages interface

public static GetISteamUnifiedMessages ( HSteamUser hSteamuser, HSteamPipe hSteamPipe, string pchVersion ) : IntPtr
hSteamuser HSteamUser
hSteamPipe HSteamPipe
pchVersion string
return System.IntPtr

GetISteamUser() public static method

retrieves the ISteamUser interface associated with the handle

public static GetISteamUser ( HSteamUser hSteamUser, HSteamPipe hSteamPipe, string pchVersion ) : IntPtr
hSteamUser HSteamUser
hSteamPipe HSteamPipe
pchVersion string
return System.IntPtr

GetISteamUserStats() public static method

returns the ISteamUserStats interface

public static GetISteamUserStats ( HSteamUser hSteamUser, HSteamPipe hSteamPipe, string pchVersion ) : IntPtr
hSteamUser HSteamUser
hSteamPipe HSteamPipe
pchVersion string
return System.IntPtr

GetISteamUtils() public static method

returns the ISteamUtils interface

public static GetISteamUtils ( HSteamPipe hSteamPipe, string pchVersion ) : IntPtr
hSteamPipe HSteamPipe
pchVersion string
return System.IntPtr

GetISteamVideo() public static method

Video

public static GetISteamVideo ( HSteamUser hSteamuser, HSteamPipe hSteamPipe, string pchVersion ) : IntPtr
hSteamuser HSteamUser
hSteamPipe HSteamPipe
pchVersion string
return System.IntPtr

ReleaseUser() public static method

removes an allocated user

NOT THREADSAFE - ensure that no other threads are accessing Steamworks API when calling

public static ReleaseUser ( HSteamPipe hSteamPipe, HSteamUser hUser ) : void
hSteamPipe HSteamPipe
hUser HSteamUser
return void

SetLocalIPBinding() public static method

set the local IP and Port to bind to

this must be set before CreateLocalUser()

public static SetLocalIPBinding ( uint unIP, ushort usPort ) : void
unIP uint
usPort ushort
return void

SetWarningMessageHook() public static method

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.

public static SetWarningMessageHook ( SteamAPIWarningMessageHook_t pFunction ) : void
pFunction SteamAPIWarningMessageHook_t
return void