frontend/src/channelstream-connection/channelstream-connection.js
/**
     * Connects user and fetches connection id from the server.
     *
     */
Connects user and fetches connection id from the server.
Connects user and fetches connection id from the server .
connect() {
        this.connection.url = this.connectUrl;
        this.connection.connectUrl = this.connectUrl;
        this.connection.disconnectUrl = this.disconnectUrl;
        this.connection.subscribeUrl = this.subscribeUrl;
        this.connection.unsubscribeUrl = this.unsubscribeUrl;
        this.connection.messageUrl = this.messageUrl;
        this.connection.messageEditUrl = this.messageEditUrl;
        this.connection.messageDeleteUrl = this.messageDeleteUrl;
        this.connection.longPollUrl = this.longPollUrl;
        this.connection.websocketUrl = this.websocketUrl;
        this.connection.userStateUrl = this.userStateUrl;
        this.connection.channels = this.channels;
        this.connection.noWebsocket = this.noWebsocket;
        this.connection.username = this.username;
        this.connection.channelsChangedCallback = this._channelsChangedCallback.bind(this);
        this.connection.connectCallback = this._connectCallback.bind(this);
        this.connection.disconnectCallback = this._disconnectCallback.bind(this);
        this.connection.listenErrorCallback = this._listenErrorCallback.bind(this);
        this.connection.listenMessageCallback = this._listenMessageCallback.bind(this);
        this.connection.listenOpenedCallback = this._listenOpenedCallback.bind(this);
        this.connection.messageCallback = this._messageCallback.bind(this);
        this.connection.messageErrorCallback = this._messageErrorCallback.bind(this);
        this.connection.messageEditCallback = this._messageEditCallback.bind(this);
        this.connection.messageEditErrorCallback = this._messageEditErrorCallback.bind(this);
        this.connection.messageDeleteCallback = this._messageDeleteCallback.bind(this);
        this.connection.messageDeleteErrorCallback = this._messageDeleteErrorCallback.bind(this);
        this.connection.setUserStateCallback = this._setUserStateCallback.bind(this);
        this.connection.setUserStateErrorCallback = this._setUserStateErrorCallback.bind(this);
        this.connection.subscribeCallback = this._subscribeCallback.bind(this);
        this.connection.subscribeErrorCallback = this._subscribeErrorCallback.bind(this);
        this.connection.unsubscribeCallback = this._unsubscribeCallback.bind(this);
        this.connection.unsubscribeErrorCallback = this._unsubscribeErrorCallback.bind(this);
        this.connection.connect();
    }
connect ( ) { this . connection . url = this . connectUrl ; this . connection . connectUrl = this . connectUrl ; this . connection . disconnectUrl = this . disconnectUrl ; this . connection . subscribeUrl = this . subscribeUrl ; this . connection . unsubscribeUrl = this . unsubscribeUrl ; this . connection . messageUrl = this . messageUrl ; this . connection . messageEditUrl = this . messageEditUrl ; this . connection . messageDeleteUrl = this . messageDeleteUrl ; this . connection . longPollUrl = this . longPollUrl ; this . connection . websocketUrl = this . websocketUrl ; this . connection . userStateUrl = this . userStateUrl ; this . connection . channels = this . channels ; this . connection . noWebsocket = this . noWebsocket ; this . connection . username = this . username ; this . connection . channelsChangedCallback = this . _channelsChangedCallback . bind ( this ) ; this . connection . connectCallback = this . _connectCallback . bind ( this ) ; this . connection . disconnectCallback = this . _disconnectCallback . bind ( this ) ; this . connection . listenErrorCallback = this . _listenErrorCallback . bind ( this ) ; this . connection . listenMessageCallback = this . _listenMessageCallback . bind ( this ) ; this . connection . listenOpenedCallback = this . _listenOpenedCallback . bind ( this ) ; this . connection . messageCallback = this . _messageCallback . bind ( this ) ; this . connection . messageErrorCallback = this . _messageErrorCallback . bind ( this ) ; this . connection . messageEditCallback = this . _messageEditCallback . bind ( this ) ; this . connection . messageEditErrorCallback = this . _messageEditErrorCallback . bind ( this ) ; this . connection . messageDeleteCallback = this . _messageDeleteCallback . bind ( this ) ; this . connection . messageDeleteErrorCallback = this . _messageDeleteErrorCallback . bind ( this ) ; this . connection . setUserStateCallback = this . _setUserStateCallback . bind ( this ) ; this . connection . setUserStateErrorCallback = this . _setUserStateErrorCallback . bind ( this ) ; this . connection . subscribeCallback = this . _subscribeCallback . bind ( this ) ; this . connection . subscribeErrorCallback = this . _subscribeErrorCallback . bind ( this ) ; this . connection . unsubscribeCallback = this . _unsubscribeCallback . bind ( this ) ; this . connection . unsubscribeErrorCallback = this . _unsubscribeErrorCallback . bind ( this ) ; this . connection . connect ( ) ; }
Connects user and fetches connection id from the server.
Connects user and fetches connection id from the server .
// this.connection.connectErrorCallback = this._connectErrorCallback.bind(this); //this.connection.listenCloseCallback //this.connection.startListeningCallback