Method | Description | |
---|---|---|
changeStatus ( SessionStatus status ) : void |
Changes the session to the one passed. Active by default. Won't update until next ping (at worst 60 seconds delay).
|
|
close ( ) : void |
Closes the session. Call this when the game is closing, or you no longer want sessions. Throws an API exception if unsuccesful.
|
|
open ( bool automated = true, int game_id = null, string username = null, string user_token = null ) : void |
Opens the the session. Will auto-manage, if automated isn't overriden. Throws an API exception if unsuccesful. Don't need to set any parameters if you've set up Config.
|
|
ping ( ) : void |
Do not use if automated. Pings the API, to indicate the session. Uses the stored status. changeStatus() to alter this. Throws an API exception if unsuccesful.
|
Method | Description | |
---|---|---|
Session ( ) : System | ||
pingE ( object source, System.Timers.ElapsedEventArgs e ) : void |
Calls ping, with event parameters as required by timer. Doesn't need to be exposed, thus different accessor.
|
public static changeStatus ( SessionStatus status ) : void | ||
status | SessionStatus | SessionStatus enum to indicate the status. |
return | void |
public static open ( bool automated = true, int game_id = null, string username = null, string user_token = null ) : void | ||
automated | bool | Do you want Session to set up a timer thread to automate the pinging? Defaults to true. |
game_id | int | ID of your Game. Only set if you haven't in config. Don't need to set parameter if you've set up Config. |
username | string | Username of your User. Don't need to set parameter if you've set up Config. |
user_token | string | User token of your User. Don't need to set parameter if you've set up Config. |
return | void |