API Docs for:
Show:

rtc.signaling.Channel Class

Extends events.EventEmitter
Module: rtc.signaling

Concept of a class implementing a signaling channel. Might be used by signaling implementations to connect to a signaling server.

You do not have to extend this class, just implement the functionality.

Item Index

Methods

Events

Methods

close

()

Closes the connection to the signaling server

connect

() Promise

Establishes the connection with the signaling server

Returns:

Promise:

Promise which is resolved when the connection is established

send

(
  • msg
)
Promise

Sends a message to the signaling server

Parameters:

  • msg Object

    The message to send

Returns:

Promise:

Promise which is resolved when the message is sent

Events

closed

()

The connection to the signaling server was closed

message

(
  • msg
)

A message was received from the signaling server

Parameters:

  • msg Object

    The received message