Home Reference Source
import ScConnection from './ui/multiplayer/sc_connection.js'
public class | source

ScConnection

Extends:

cables-shared-client~Events → ScConnection

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public
public
public

PING_INTERVAL: number

public get

chat: *

public get

client: *

public get
public get

clients: *

public get
public get
public get
public get
public
public get
public get
public get
public
public get
public get
public get

state: *

public get

synced: *

public
public
Private Members
private

_active: *

private

_chat: *

private

_connected: boolean

private
private
private
private
private

_log: *

private
private

_paco: *

private
private

_pacoEnabled: boolean

private

_pacoLoopReady: boolean

private

_pacoSynced: boolean

private
private
private

_socket: *

private

_state: *

private

_token: *

private

_verboseLog: boolean

Method Summary

Public Methods
public
public
public

getPilot(): *

public
public

hasPilot(): *

public
public
public
public
public
public

sendChat(text: *)

public

sendControl(name: *, payload: *)

public
public

sendInfo(name: *, text: *)

public

sendNotification(title: *, text: *)

public

sendPaco(payload: *, name: string)

public

sendUi(name: *, payload: *, sendOnEmptyClientList: boolean)

public

setPacoPaused(paused: *)

public
public
public

startRemoteViewer(doneCallback: *)

public

track(eventCategory: *, eventAction: *, eventLabel: *, meta: {})

Private Methods
private
private
private
private
private
private

_init(doneCallback: *)

private

_logVerbose(prefix: *, channel: *, msg: *)

private

_reconnectViewer(startSessionListener: *)

private

_send(channel: *, topic: *, payload: *)

private

_sendPing(startedSession: boolean)

private

_startPacoSend(requestedBy: *, forceResync: boolean)

private
private

Public Constructors

public constructor() source

Public Members

public OWN_PINGS_TO_TIMEOUT: number source

public PINGS_TO_TIMEOUT: number source

public PING_INTERVAL: number source

public get chat: * source

public get client: * source

public get clientId: * source

public get clients: * source

public get connected: * source

public get followers: * source

public get hasOtherMultiplayerCapableClients: * source

public get inMultiplayerSession: * source

public multiplayerCapable: * source

public get netMouseCursorDelay: number source

public get netTimelineScrollDelay: number source

public get onlyRemoteClientsConnected: * source

public patchChannelName: * source

public get runningMultiplayerSession: * source

public get showGuestUsers: * source

public get state: * source

public get synced: * source

public userChannelName: * source

public userPatchChannelName: * source

Private Members

private _active: * source

private _chat: * source

private _connected: boolean source

private _connectedSince: * source

private _inSessionSince: * source

private _lastPingReceived: * source

private _lastPingSent: * source

private _log: * source

private _multiplayerUi: * source

private _paco: * source

private _pacoChannel: * source

private _pacoEnabled: boolean source

private _pacoLoopReady: boolean source

private _pacoSynced: boolean source

private _patchConnection: * source

private _scConfig: * source

private _socket: * source

private _state: * source

private _token: * source

private _verboseLog: boolean source

Public Methods

public canSaveInMultiplayer(): boolean source

Return:

boolean

public enableVerboseLogging() source

public getPilot(): * source

Return:

*

public getTimestamp(): * source

Return:

*

public hasPilot(): * source

Return:

*

public isConnected(): * source

Return:

*

public joinMultiplayerSession() source

public leaveMultiplayerSession() source

public reconnectRemoteViewer() source

public requestPilotPatch() source

public sendChat(text: *) source

Params:

NameTypeAttributeDescription
text *

public sendControl(name: *, payload: *) source

Params:

NameTypeAttributeDescription
name *
payload *

public sendCurrentVersion() source

public sendInfo(name: *, text: *) source

Params:

NameTypeAttributeDescription
name *
text *

public sendNotification(title: *, text: *) source

Params:

NameTypeAttributeDescription
title *
text *

public sendPaco(payload: *, name: string) source

Params:

NameTypeAttributeDescription
payload *
name string
  • optional
  • default: paco

public sendUi(name: *, payload: *, sendOnEmptyClientList: boolean) source

Params:

NameTypeAttributeDescription
name *
payload *
sendOnEmptyClientList boolean
  • optional
  • default: false

public setPacoPaused(paused: *) source

Params:

NameTypeAttributeDescription
paused *

public showChat() source

public startMultiplayerSession() source

public startRemoteViewer(doneCallback: *) source

Params:

NameTypeAttributeDescription
doneCallback *

public track(eventCategory: *, eventAction: *, eventLabel: *, meta: {}) source

Params:

NameTypeAttributeDescription
eventCategory *
eventAction *
eventLabel *
meta {}
  • optional
  • default: {}

Private Methods

private _handleChatChannelMsg(msg: *) source

Params:

NameTypeAttributeDescription
msg *

private _handleControlChannelMessage(msg: *) source

Params:

NameTypeAttributeDescription
msg *

private _handleInfoChannelMsg(msg: *) source

Params:

NameTypeAttributeDescription
msg *

private _handlePacoMessage(msg: *) source

Params:

NameTypeAttributeDescription
msg *

private _handleUiChannelMsg(msg: *) source

Params:

NameTypeAttributeDescription
msg *

private _init(doneCallback: *) source

Params:

NameTypeAttributeDescription
doneCallback *

private _logVerbose(prefix: *, channel: *, msg: *) source

Params:

NameTypeAttributeDescription
prefix *
channel *
msg *

private _reconnectViewer(startSessionListener: *) source

Params:

NameTypeAttributeDescription
startSessionListener *

private _send(channel: *, topic: *, payload: *) source

Params:

NameTypeAttributeDescription
channel *
topic *
payload *

private _sendPing(startedSession: boolean) source

Params:

NameTypeAttributeDescription
startedSession boolean
  • optional
  • default: false

private _startPacoSend(requestedBy: *, forceResync: boolean) source

Params:

NameTypeAttributeDescription
requestedBy *
forceResync boolean
  • optional
  • default: false

private _synchronizePatch(data: *) source

Params:

NameTypeAttributeDescription
data *

private _updateMembers() source