Web UI Session object. This keeps track of miscellaneous items associated with the game session.
transient webSession : object
Superclass Tree (in declaration order)
webSession
object
Summary of Properties
clientSessions
collabKey
everHadClient
hkTime
lastClientTime
launcherGameID
launcherUsername
server
sessionKey
storageSID
Summary of Methods
addClient
connectUI
getCollabUrl
getFullUrl
housekeeping
removeClient
validateKey
Properties
list of active client sessions (ClientSession objects)
The collaborative session key. This is a secondary session key that allows additional users to connect to the session for collaborative play.
have we ever had a client connection?
system time (ms ticks) of next scheduled housekeeping pass
the last time we noticed that we had a client connected
The launcher's game ID. This is the ID passed from the web server that launched the game, to let us know how the game is identified in the launcher database. This is typically an IFDB TUID string.
The launcher's user name. This is passed from the web server that launched the game, to let us know the host user's screen name. We use this as the user's default screen name in multi-user games.
the HTTPServer object running our web session
The session key. This identifies the server as a whole, and is essentially an authentication mechanism that lets clients prove they got our address from an authorized source (rather than just stumbling across it via a port scan, say). Clients must hand this to us on each request, either via a URL query parameter or via a cookie. The normal setup (via WebResourceInit) is for the client to send us the key as a URL parameter on the initial request, at which point we'll pass it back as a set-cookie, removing the need for the client to include the key in subsequent URLs.
The key is just a random number that's long enough that an interloper couldn't hope to guess it. We generate this on the first evaluation, and it remains fixed at that point for as long as we're running.
The primary storage server session ID, for the user who launched the server. If the user who launched the game logged in to a cloud storage server, this is the session ID that we use to transact business with the server on behalf of this logged-in user. This token identifies and authenticates the user, but it's ephemeral and it's only valid for the current game server session, so it's not quite like a password. This is the session for the launch user only; if other collaborative users join, they can get their own session IDs that will allow them to store files under their own private user folders on the server.
Methods
Connect to the UI. By default, we ask the webMainWin object to establish a connection, and we save the server object internally for future reference.
Get the collaborative player launch URL. This is a URL that the host can send to other players who wish to join the session as collaborative users.
Get the full URL to the given resource.
Run housekeeping tasks. The network event processor calls this periodically to let us perform background cleanup tasks. Returns the system tick time of the next housekeeping run.
Validate a session key sent from the client
Adv3Lite Library Reference Manual
Generated on 25/04/2024 from adv3Lite version 2.0