Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IClient

The interface implemented by all classes that wish to represent a client in the Orbiter API. The built-in Client class implements IClient, and is used to represent any client in an application that does not have a custom client class specified. Developers that wish to use a custom class, rather than Client, to represent clients in an Orbiter application must create a class that implements the IClient interface, and then assign that class as a custom client class via Client.setClientClass method, Room.setDefaultClientClass method, or ClientManager.setDefaultClientClass method.

Hierarchy

  • IClient

Implemented by

Index

Methods

ban

  • ban(duration: number, reason?: undefined | string): void
  • Parameters

    • duration: number
    • Optional reason: undefined | string

    Returns void

deleteAttribute

  • deleteAttribute(attrName: string, attrScope?: undefined | string): void
  • Parameters

    • attrName: string
    • Optional attrScope: undefined | string

    Returns void

getAccount

getAttribute

  • getAttribute(attrName: String, attrScope?: undefined | string): string | null
  • Parameters

    • attrName: String
    • Optional attrScope: undefined | string

    Returns string | null

getAttributes

  • getAttributes(): {} | null
  • Returns {} | null

getAttributesByScope

  • getAttributesByScope(scope?: undefined | string): {} | {} | null
  • Parameters

    • Optional scope: undefined | string

    Returns {} | {} | null

getClientID

  • getClientID(): string
  • Returns string

getClientManager

getConnectTime

  • getConnectTime(): number
  • Returns number

getConnectionState

  • getConnectionState(): number
  • Returns number

getIP

  • getIP(): string | null
  • Returns string | null

getObservedRoomIDs

  • getObservedRoomIDs(): string[]
  • Returns string[]

getOccupiedRoomIDs

  • getOccupiedRoomIDs(): string[]
  • Returns string[]

getPing

  • getPing(): number
  • Returns number

getTimeOnline

  • getTimeOnline(): Number
  • Returns Number

isAdmin

  • isAdmin(): boolean
  • Returns boolean

isInRoom

  • isInRoom(roomID: string): boolean
  • Parameters

    • roomID: string

    Returns boolean

isObservingRoom

  • isObservingRoom(roomID: string): boolean
  • Parameters

    • roomID: string

    Returns boolean

isSelf

  • isSelf(): boolean
  • Returns boolean

kick

  • kick(): void
  • Returns void

observe

  • observe(): void
  • Returns void

sendMessage

  • sendMessage(messageName: string, ...rest: any): void
  • Parameters

    • messageName: string
    • Rest ...rest: any

    Returns void

setAttribute

  • setAttribute(attrName: String, attrValue: String, attrScope: string, isShared: boolean, evaluate: boolean): void
  • Parameters

    • attrName: String
    • attrValue: String
    • attrScope: string
    • isShared: boolean
    • evaluate: boolean

    Returns void

setClientClass

  • setClientClass(scope: string, clientClass: any, ...fallbackClasses: any): void
  • Parameters

    • scope: string
    • clientClass: any
    • Rest ...fallbackClasses: any

    Returns void

stopObserving

  • stopObserving(): void
  • Returns void