Options
All
  • Public
  • Public/Protected
  • All
Menu

MAGE session class

class

Session

Hierarchy

  • Session

Index

Properties

actorId

actorId: string

An actor ID to associate with this session

type

{string}

memberof

Session

clusterId

clusterId: string

The clusterId associated with this session (for mmrp)

type

{string}

memberof

Session

creationTime

creationTime: number

Unix timestamp of the creation time of this session

type

{number}

memberof

Session

key

key: string

The session key

type

{string}

memberof

Session

language

language: string

The language of the user

type

{string}

memberof

Session

meta

meta: object

Key/value meta data object to store with the session

type

{Object}

memberof

Session

Type declaration

  • [id: string]: string

version

version: string

The game version at the time of registration

type

{string}

memberof

Session

Methods

delData

  • delData(key: string): void
  • Deletes the data at a given key

    memberof

    Session

    Parameters

    • key: string

    Returns void

expire

  • expire(state: IState, reason: string): void
  • Expires the session and communicates it to the client passing the given reason

    Parameters

    • state: IState
    • reason: string

    Returns void

extend

  • Recalculates a new expiration time for the session and saves it

    memberof

    Session

    Parameters

    Returns void

getData

  • getData(key: string): any
  • Returns data for the given key

    memberof

    Session

    Parameters

    • key: string

    Returns any

setData

  • setData(key: string, value: any): void
  • Sets data at a given key

    memberof

    Session

    Parameters

    • key: string
    • value: any

    Returns void