Options
All
  • Public
  • Public/Protected
  • All
Menu

Class WebSocketAdapter

The WebSocketAdapter is appropriate to use when the host environment has an authoritative simluation, and that authoritative simulation is the only connection made to the Mixed Reality Extension (MRE) app.

Example hosts:

  • Single player environments
  • Server-based multiuser topologies

Hierarchy

Index

Constructors

Events

Accessors

Methods

Constructors

constructor

Events

onConnection

  • onConnection(handler: function): this
  • The onConnection event is raised when a new Context is created for an application session. This happens when the first client connects to your application.

    Parameters

    Returns this

Accessors

port

  • get port(): string | number
  • Returns string | number

server

  • get server(): Server
  • set server(value: Server): void
  • Returns Server

  • Parameters

    • value: Server

    Returns void

Methods

listen

  • listen(): Promise<Server>
  • Start the adapter listening for new connections.

    Returns Promise<Server>