SkylinkSignalingServer

SkylinkSignalingServer

Singleton class that represents a signaling server

Constructor

(private) new SkylinkSignalingServer()

Source:

Members

attempts :number

Stores the number of socket reconnect attempts

Source:

config :Object

Config needed for create a socket and establishing a socket connection with the Signaling Server

Source:

messageBuilder :SignalingMessageBuilder

Handler for outbound messages via the socket

Source:

messageHandler :SignalingMessageHandler

Handler for incoming messages on the socket

Source:

socket :WebSocket

Stores the WebSocket object

Source:

timestamp :number

Current timestamp

Source:

Methods

answer(…args)

Parameters:
Name Type Attributes Description
args <repeatable>
Source:

createSocket(roomKey) → {Promise}

Method that creates a socket - Returns the same instance of socket if already created.

Parameters:
Name Type Description
roomKey SkylinkRoom.id
Source:
Fires:
  • event:socketError

enterRoom(…args)

Parameters:
Name Type Attributes Description
args <repeatable>
Source:

getPeerList(showAll)

Parameters:
Name Type Description
showAll boolean
Source:

setUserData(roomState)

Parameters:
Name Type Description
roomState SkylinkState
Source: