Home Manual Reference Source Repository

Function

Static Public Summary
public

Create WebChannel.

Static Public

public create(options: WebChannelSettings): WebChannel source

import {create} from 'netflux/src/index.js'

Create WebChannel.

Params:

NameTypeAttributeDescription
options WebChannelSettings
options.connector WEB_RTC | WEB_SOCKET
  • optional
  • default: WEB_RTC

Which connector is preferable during connection establishment

options.topology FULLY_CONNECTED
  • optional
  • default: FULLY_CONNECTED

Fully connected topology is the only one available for now

options.signalingURL string
  • optional
  • default: 'wss://sigver-coastteam.rhcloud.com:8443'

Signaling server url

options.iceServers RTCIceServer
  • optional
  • default: [{urls:'stun:turn01.uswest.xirsys.com'}]

Set of ice servers for WebRTC

options.listenOn string
  • optional
  • default: ''

Server url when the peer is listen on web socket

Return:

WebChannel